diff --git a/src/common/subsystem-runner.hpp b/src/common/subsystem-runner.hpp index 1d015ea40..fe9808d1d 100644 --- a/src/common/subsystem-runner.hpp +++ b/src/common/subsystem-runner.hpp @@ -193,10 +193,7 @@ namespace lumiera { throw error::Logic("Subsystem "+string(*susy)+" failed to start"); } -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility if (not and_all (susy->getPrerequisites(), isRunning() )) -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - if (true) ////FIXME { susy->triggerShutdown(); throw error::State("Unable to start all prerequisites of Subsystem "+string(*susy)); diff --git a/src/lib/meta/trait.hpp b/src/lib/meta/trait.hpp index ab396cc18..b534d8e5a 100644 --- a/src/lib/meta/trait.hpp +++ b/src/lib/meta/trait.hpp @@ -477,6 +477,18 @@ namespace meta { && HasFunSig_end::value }; }; + + struct is_noexcept_iterable + { + META_DETECT_NESTED(iterator); + META_DETECT_FUNCTION(typename X::iterator, begin,(void) noexcept); + META_DETECT_FUNCTION(typename X::iterator, end ,(void) noexcept); + + enum { value = HasNested_iterator::value + && HasFunSig_begin::value + && HasFunSig_end::value + }; + }; struct is_const_iterable { @@ -490,10 +502,24 @@ namespace meta { }; }; + struct is_const_noexcept_iterable + { + META_DETECT_NESTED(const_iterator); + META_DETECT_FUNCTION(typename X::const_iterator, begin,(void) const noexcept); + META_DETECT_FUNCTION(typename X::const_iterator, end ,(void) const noexcept); + + enum { value = HasNested_const_iterator::value + && HasFunSig_begin::value + && HasFunSig_end::value + }; + }; + public: enum { value = is_iterable::value - || is_const_iterable::value + or is_const_iterable::value + or is_noexcept_iterable::value + or is_const_noexcept_iterable::value }; }; @@ -516,6 +542,18 @@ namespace meta { }; }; + struct is_noexcept_backIterable + { + META_DETECT_NESTED(reverse_iterator); + META_DETECT_FUNCTION(typename X::reverse_iterator, rbegin,(void) noexcept); + META_DETECT_FUNCTION(typename X::reverse_iterator, rend ,(void) noexcept); + + enum { value = HasNested_reverse_iterator::value + && HasFunSig_rbegin::value + && HasFunSig_rend::value + }; + }; + struct is_const_backIterable { META_DETECT_NESTED(const_reverse_iterator); @@ -528,10 +566,24 @@ namespace meta { }; }; + struct is_const_noexcept_backIterable + { + META_DETECT_NESTED(const_reverse_iterator); + META_DETECT_FUNCTION(typename X::const_reverse_iterator, rbegin,(void) const noexcept); + META_DETECT_FUNCTION(typename X::const_reverse_iterator, rend ,(void) const noexcept); + + enum { value = HasNested_const_reverse_iterator::value + && HasFunSig_rbegin::value + && HasFunSig_rend::value + }; + }; + public: enum { value = is_backIterable::value - || is_const_backIterable::value + or is_const_backIterable::value + or is_noexcept_backIterable::value + or is_const_noexcept_backIterable::value }; }; diff --git a/src/stage/workspace/dock-area.cpp b/src/stage/workspace/dock-area.cpp index ce990ad16..a78d0fe92 100644 --- a/src/stage/workspace/dock-area.cpp +++ b/src/stage/workspace/dock-area.cpp @@ -147,13 +147,10 @@ namespace workspace { bool DockArea::hasPanel (const int description_index) { -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility return util::has_any (panels_, [=](panel::Panel* panel) { return getPanelType(panel) == description_index; }); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - return false; /////FIXME } panel::Panel& diff --git a/src/stage/workspace/panel-manager.cpp b/src/stage/workspace/panel-manager.cpp index 767cef434..92593695d 100644 --- a/src/stage/workspace/panel-manager.cpp +++ b/src/stage/workspace/panel-manager.cpp @@ -140,13 +140,10 @@ namespace workspace { bool PanelManager::hasPanel (const int description_index) { -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility return util::has_any (panels_, [=](panel::Panel* panel) { return getPanelType(panel) == description_index; }); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - return false; //////FIXME } panel::Panel& diff --git a/src/steam/asset.cpp b/src/steam/asset.cpp index d01f789f0..85055c5c8 100644 --- a/src/steam/asset.cpp +++ b/src/steam/asset.cpp @@ -117,10 +117,7 @@ namespace asset { bool all_parents_enabled (const vector& parents) { -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility return and_all (parents, check_isActive); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - return false; } /** diff --git a/src/steam/play/play-service.cpp b/src/steam/play/play-service.cpp index 13d181d41..be8675eec 100644 --- a/src/steam/play/play-service.cpp +++ b/src/steam/play/play-service.cpp @@ -119,10 +119,7 @@ namespace play { bool isActive() const { -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility return not and_all (processes_, isDead); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - return false; } private: diff --git a/tests/core/steam/engine/dispatcher-interface-test.cpp b/tests/core/steam/engine/dispatcher-interface-test.cpp index 15ff5239b..62ebdc8c2 100644 --- a/tests/core/steam/engine/dispatcher-interface-test.cpp +++ b/tests/core/steam/engine/dispatcher-interface-test.cpp @@ -211,10 +211,7 @@ namespace test { vector plannedChunk; lib::append_all (jobs, plannedChunk); -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility Duration coveredTime (Offset(refPoint, last(plannedChunk).getNominalTime())); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - Duration coveredTime (lib::time::FSecs(23,55)); /////////////////////FIXME CHECK (coveredTime >= timings.getPlanningChunkDuration()); ///TODO nachfolgendes muß komplett umgeschrieben werden @@ -223,7 +220,7 @@ namespace test { #if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880 TimeVar frameStart (refPoint); - InvocationInstanceID prevInvocationID(0); + InvocationInstanceID prevInvocationID(0); ///////////////////////////////////////////////////////TICKET #1138 : C++17 requires explicit ctor for initialisation of union Offset expectedTimeIncrement (1, FrameRate::PAL); for (uint i=0; i < plannedChunk.size(); ++i ) { diff --git a/tests/library/diff/mutation-message-test.cpp b/tests/library/diff/mutation-message-test.cpp index 01fe8cf12..3bad00977 100644 --- a/tests/library/diff/mutation-message-test.cpp +++ b/tests/library/diff/mutation-message-test.cpp @@ -276,7 +276,6 @@ namespace test{ ,set(ATTRIB1) ,del(CHILD_T)}), steps); -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility diffMsg = MutationMessage{steps}; CHECK (!isnil (diffMsg)); @@ -284,8 +283,6 @@ namespace test{ CHECK (set(ATTRIB1) == *++diffMsg); CHECK (del(CHILD_T) == *++diffMsg); CHECK (isnil (++diffMsg)); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); } diff --git a/tests/library/iter-chain-search-test.cpp b/tests/library/iter-chain-search-test.cpp index a4e83ec66..714af1695 100644 --- a/tests/library/iter-chain-search-test.cpp +++ b/tests/library/iter-chain-search-test.cpp @@ -117,7 +117,6 @@ namespace test{ void simpleSearch () { -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility auto search = chainSearch(SPAM) .search("bacon") .search("tomato"); @@ -139,8 +138,6 @@ namespace test{ CHECK (not search); CHECK (isnil (search)); VERIFY_ERROR (ITER_EXHAUST, *search); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); } @@ -155,7 +152,6 @@ namespace test{ void chainedIteration () { -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility auto search = chainSearch(SPAM) // Note: 1st filter step picks all s-words .search([](string const& str){ return startsWith (str, "s"); }); @@ -179,8 +175,6 @@ namespace test{ "bacon-tomato-and-" // any non-spam behind the 3rd spam "tomato-and" // any non-spam behind the 4th spam ""); // and any non-spam behind the final spam -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); } diff --git a/tests/library/iter-tree-explorer-test.cpp b/tests/library/iter-tree-explorer-test.cpp index 1f657e38f..cb8fc8470 100644 --- a/tests/library/iter-tree-explorer-test.cpp +++ b/tests/library/iter-tree-explorer-test.cpp @@ -340,13 +340,10 @@ namespace test{ CHECK (materialise(jj) == "3--5-8--13"); // can even adapt STL container automatically -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility auto kk = treeExplore(numz); CHECK (!isnil (kk)); CHECK (1 == *kk); CHECK (materialise(kk) == "1--2-3--5-8--13"); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); } @@ -395,12 +392,10 @@ namespace test{ .expand([](uint j){ return CountDown{j-1}; }) // expand-functor: Val > StateCore ); -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility verify_treeExpandingIterator( treeExplore(CountDown{5}) .expand([](uint j){ return NumberSequence{j-1}; }) // expand-functor: Val > Iter ); // NOTE: different Iterator type than the source! -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility // lambda with side-effect and return type different from source iter vector> childBuffer; @@ -413,12 +408,10 @@ namespace test{ return childNumbz; }; -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility verify_treeExpandingIterator( treeExplore(CountDown{5}) .expand(expandIntoChildBuffer) // expand-functor: Val > STL-container& ); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility // test routine called the expansion functor five times CHECK (5 == childBuffer.size()); @@ -586,7 +579,6 @@ namespace test{ // demonstrate chaining of several transformation layers vector numz{1,-2,3,-5,8,-13}; -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility CHECK ("≺1≻-≺-2≻-≺3≻-≺-5≻-≺8≻-≺-13≻" == materialise (treeExplore(numz) .transform(formatify)) ); @@ -599,8 +591,6 @@ namespace test{ .transform(multiply) .transform(formatify) .transform(formatify)) ); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); // demonstrate the functor is evaluated only once per step diff --git a/tests/library/util-collection-test.cpp b/tests/library/util-collection-test.cpp index 5d2a7f71f..eb6292598 100644 --- a/tests/library/util-collection-test.cpp +++ b/tests/library/util-collection-test.cpp @@ -96,11 +96,8 @@ namespace test { VecI container = someNumberz (NUM_ELMS); RangeI iterator(container.begin(), container.end()); -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility verify_accessFirstLast (container, NUM_ELMS); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility verify_accessFirstLast (iterator, NUM_ELMS); - UNIMPLEMENTED ("C++17"); } diff --git a/tests/library/util-foreach-test.cpp b/tests/library/util-foreach-test.cpp index c500e78ec..5be9fc175 100644 --- a/tests/library/util-foreach-test.cpp +++ b/tests/library/util-foreach-test.cpp @@ -131,7 +131,6 @@ namespace test { VecI container = buildTestNumberz (NUM_ELMS); RangeI iterator(container.begin(), container.end()); -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility check_foreach_plain (container); check_foreach_plain (iterator); @@ -152,8 +151,6 @@ namespace test { CHECK (int(NUM_ELMS) ==container[0]); check_ref_argument_bind (container); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); CHECK (int(NUM_ELMS) ==container[0]); check_ref_argument_bind (iterator); @@ -413,7 +410,6 @@ namespace test { // fed the element pointer as "this" pointer of the member function for_each (elmPtrs, &TestElm::operation, _1 ); _NL_ -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility and_all (elmPtrs, &TestElm::operation, _1 ); _NL_ has_any (elmPtrs, &TestElm::operation, _1 ); _NL_ @@ -421,8 +417,6 @@ namespace test { for_each (elms, &TestElm::operation, _1 ); _NL_ and_all (elms, &TestElm::operation, _1 ); _NL_ has_any (elms, &TestElm::operation, _1 ); _NL_ -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); // note: it seems not to be possible to create a binder, which takes the "*this"-Argument by ref } diff --git a/tests/library/verb-visitor-dispatch-test.cpp b/tests/library/verb-visitor-dispatch-test.cpp index 2ff6922ed..bd50835f6 100644 --- a/tests/library/verb-visitor-dispatch-test.cpp +++ b/tests/library/verb-visitor-dispatch-test.cpp @@ -198,7 +198,6 @@ namespace test{ { VerboseRenderer verbose; DiagnosticRenderer diagnostic; -#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility auto render = [&](Receiver& renderer) { return join (lib::treeExplore(tokens) @@ -211,8 +210,6 @@ namespace test{ CHECK (render(diagnostic) == "woof(false,3)-honk(quaack)-honk(Hoonk)-woof(true,2)-moo(3)-meh()"); CHECK (render(verbose) == "haw-hawhaw-hawhaw-hawhaw-haw-quaack-quaack!-Hoonk-Hoonk!-Woof..Woof..-Moo__Moo__Moo-Meh?"); -#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility - UNIMPLEMENTED ("C++17"); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 23dd611aa..28d0baf5b 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -45528,7 +45528,9 @@ - + + + @@ -45579,21 +45581,223 @@ + + + + + + + + + + + + - - + + + + - + + + + + + + + + + + + + + + + +

+ die überladene const-Variante ist der Grund +

+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Frage: wollen wir auf noexcept einschränken? +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
    +
  • + als schneller Fix implementiert +
  • +
  • + und tatsächlich nur einmal, für einen Test verwendet +
  • +
  • + eigentlich wird damit das Problem "unter den Teppich gekehrt" +
  • +
+ + +
+ +
+
+ + + + + + + +

+ "sinnvoll" heißt +

+
    +
  • + stabil +
  • +
  • + lesbar +
  • +
+ + +
+ +
+
+ + + + + + + + + + + + + + +

+ warum...? +

+

+ ..vermutlich, weil ich ab einem gewissen Punkt damit angefangen habe, auch die Lumiera-Iteratoren als "foreach-iterierbar" zu dekorieren (indem sie freie begin(iter) und end(iter)-Funktionen bieten). +

+ + +
+ +
+
+ + + +
+ + + + + + + + + +

+ es sollte genau die Eigenschaften abdecken, die wir tatsächlich brauchen +

+ + +
+
+ + + + + + + + + + + + + + + +