C++17: fix detector for STL container iterability
the reason for the failure, as it turned out, is that 'noexcept' is part of the function signature since C++17 And, since typically a STL container has const and non-const variants of the begin() and end() function, the match to a member function pointer became ambuguous, when probing with a signature without 'noexcept' However, we deliberately want to support "any STL container like" types, and this IMHO should include types with a possibly throwing iterator. The rationale is, sometimes we want to expose some element *generator* behind a container-like interface. At this point I did an investigation if we can emulate something in the way of a Concept -- i.e. rather than checking for the presence of some functions on the interface, better try to cover the necessary behaviour, like in a type class. Unfortunately, while doable, this turns out to become quite technical; and this highlights why the C++20 concepts are such an important addition to the language. So for the time being, we'll amend the existing solution and look ahead to C++20
This commit is contained in:
parent
577592c66e
commit
8c12e88fd3
14 changed files with 263 additions and 56 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -477,6 +477,18 @@ namespace meta {
|
|||
&& HasFunSig_end<Type>::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<Type>::value
|
||||
&& HasFunSig_begin<Type>::value
|
||||
&& HasFunSig_end<Type>::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<Type>::value
|
||||
&& HasFunSig_begin<Type>::value
|
||||
&& HasFunSig_end<Type>::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<Type>::value
|
||||
&& HasFunSig_rbegin<Type>::value
|
||||
&& HasFunSig_rend<Type>::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<Type>::value
|
||||
&& HasFunSig_rbegin<Type>::value
|
||||
&& HasFunSig_rend<Type>::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
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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&
|
||||
|
|
|
|||
|
|
@ -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&
|
||||
|
|
|
|||
|
|
@ -117,10 +117,7 @@ namespace asset {
|
|||
bool
|
||||
all_parents_enabled (const vector<PAsset>& 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -211,10 +211,7 @@ namespace test {
|
|||
vector<Job> 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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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<vector<uint>> 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<int64_t> 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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45528,7 +45528,9 @@
|
|||
<node CREATED="1581992780940" ID="ID_846156960" MODIFIED="1581992784682" TEXT="last">
|
||||
<node CREATED="1581992786719" ID="ID_868210635" MODIFIED="1581992786719" TEXT="enable_if< treat_as_LumieraIterator<IT>"/>
|
||||
<node CREATED="1581992844006" ID="ID_1452486285" MODIFIED="1581992844915" TEXT="enable_if<util::{anonymous}::can_direct_access_Last<COLL>"/>
|
||||
<node CREATED="1581992817306" ID="ID_1958248231" MODIFIED="1581992819485" TEXT="von dispatcher-interface-test.cpp"/>
|
||||
<node CREATED="1581992817306" ID="ID_1958248231" MODIFIED="1582226909217" TEXT="von dispatcher-interface-test.cpp">
|
||||
<arrowlink COLOR="#1b487d" DESTINATION="ID_1278435250" ENDARROW="Default" ENDINCLINATION="531;0;" ID="Arrow_ID_1907491946" STARTARROW="Default" STARTINCLINATION="436;0;"/>
|
||||
</node>
|
||||
<node CREATED="1581994136969" ID="ID_1071697988" MODIFIED="1581994140342" TEXT="util-collection-test.cpp">
|
||||
<icon BUILTIN="back"/>
|
||||
<node CREATED="1581994205823" ID="ID_548485755" MODIFIED="1581994218847" TEXT="sehr interessant: der Iterator-Fall funktioniert nämlich">
|
||||
|
|
@ -45579,21 +45581,223 @@
|
|||
</node>
|
||||
<node CREATED="1581994029929" ID="ID_20368460" MODIFIED="1581994030643" TEXT="no type named 'Args' in 'struct lib::meta::_Fun<int (*)() noexcept, void>'"/>
|
||||
</node>
|
||||
<node CREATED="1582226720811" ID="ID_1404034997" MODIFIED="1582226979278" TEXT="job.h : InvocationInstanceID ctor unclear">
|
||||
<linktarget COLOR="#ca99b1" DESTINATION="ID_1404034997" ENDARROW="Default" ENDINCLINATION="-5;81;" ID="Arrow_ID_402256801" SOURCE="ID_520524824" STARTARROW="None" STARTINCLINATION="235;22;"/>
|
||||
<node CREATED="1582226760132" ID="ID_1708527048" MODIFIED="1582226852847" TEXT="bis jetzt hat der Compiler einen "paßt scho"-ctor synthetisiert">
|
||||
<icon BUILTIN="smiley-neutral"/>
|
||||
</node>
|
||||
<node CREATED="1582226854666" ID="ID_1829839467" MODIFIED="1582226871843" TEXT="sieht aber nach unvollständigem oder schlampigem Design aus">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1581992817306" ID="ID_1278435250" MODIFIED="1582226909217" TEXT="ebenfalls von dispatcher-interface-test.cpp">
|
||||
<linktarget COLOR="#1b487d" DESTINATION="ID_1278435250" ENDARROW="Default" ENDINCLINATION="531;0;" ID="Arrow_ID_1907491946" SOURCE="ID_1958248231" STARTARROW="Default" STARTINCLINATION="436;0;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1581995421239" ID="ID_1730281364" MODIFIED="1581995495636" TEXT="mutmaßliche Probleme">
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1581995443649" ID="ID_986769823" MODIFIED="1581995498074" TEXT="STL collection duck detector greift nicht mehr">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#435e98" CREATED="1581995443649" ID="ID_986769823" MODIFIED="1582306722680" TEXT="STL collection duck detector greift nicht mehr">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1582073183681" ID="ID_652495805" MODIFIED="1582073205034" TEXT="erklärt Defekt">
|
||||
<node CREATED="1582073420161" ID="ID_1988954672" MODIFIED="1582073427721" TEXT="util-foreach-Prädikate"/>
|
||||
<node CREATED="1581995510176" ID="ID_1166388129" MODIFIED="1581995518450" TEXT="util-coll-Prädikate"/>
|
||||
<node CREATED="1581995535628" ID="ID_829639067" MODIFIED="1581995540536" TEXT="TreeExplorer"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1581995458449" ID="ID_524595490" MODIFIED="1581995499994" TEXT="meta::_Fun Type-Deduction greift nicht mehr">
|
||||
<node COLOR="#338800" CREATED="1582073220260" ID="ID_140955956" MODIFIED="1582233559353" TEXT="Untersuchung">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1582073223795" ID="ID_596161629" MODIFIED="1582073232715" TEXT="DuckDetector_test PASS">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1582073234062" ID="ID_1909467497" MODIFIED="1582073239279" TEXT="also kein elementares Problem"/>
|
||||
</node>
|
||||
<node CREATED="1582075935580" ID="ID_27838904" MODIFIED="1582075956597" TEXT="begin() / end() sind jetzt noexcept"/>
|
||||
<node CREATED="1582075957329" ID="ID_1720366662" MODIFIED="1582075973818" TEXT="das hat wohl Einfluß auf die type deduction"/>
|
||||
<node CREATED="1582233029258" ID="ID_1301588264" MODIFIED="1582233055488" TEXT="Duck-Detector (in try.cpp) nachgebaut...">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1582233058772" ID="ID_1586059095" MODIFIED="1582233088483">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
die <b>überladene const</b>-Variante ist der Grund
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1582233338068" ID="ID_982873335" MODIFIED="1582233352296" TEXT="eine einzeln stehende Funktion würde implizit konvertiert"/>
|
||||
<node CREATED="1582233362797" ID="ID_833938257" MODIFIED="1582233401713" TEXT="aber er kann nicht entscheiden func const">
|
||||
<node CREATED="1582233402761" ID="ID_712697643" MODIFIED="1582233402761" TEXT="-> func noexcept"/>
|
||||
<node CREATED="1582233405153" ID="ID_248777238" MODIFIED="1582233417751" TEXT="-> func const noexcept"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1582233448999" ID="ID_1418345816" MODIFIED="1582233462949" TEXT="Fazit">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<icon BUILTIN="back"/>
|
||||
<node CREATED="1582233464208" ID="ID_1766502973" MODIFIED="1582233477724" TEXT="wenn wir beide Varianten "greifen" wollen...."/>
|
||||
<node CREATED="1582233478442" ID="ID_173149831" MODIFIED="1582306757303" TEXT="dann brauchen wir zwei "Greifer"!!!">
|
||||
<arrowlink COLOR="#0eaf68" DESTINATION="ID_374929365" ENDARROW="Default" ENDINCLINATION="143;-60;" ID="Arrow_ID_325541082" STARTARROW="None" STARTINCLINATION="279;23;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1581995458449" ID="ID_524595490" MODIFIED="1582226929460" TEXT="meta::_Fun Type-Deduction greift nicht mehr">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1582073209005" ID="ID_1128456119" MODIFIED="1582073212094" TEXT="erklärt Defekt">
|
||||
<node CREATED="1581995542307" ID="ID_1935687224" MODIFIED="1581995545415" TEXT="transformIterator"/>
|
||||
<node CREATED="1581995546475" ID="ID_1004262725" MODIFIED="1581995552782" TEXT="stringify"/>
|
||||
<node CREATED="1581995553206" ID="ID_984495822" MODIFIED="1581995556030" TEXT="util::join"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582226930039" ID="ID_520524824" MODIFIED="1582226984574" TEXT="Union-Initialisierung on-the-fly">
|
||||
<arrowlink COLOR="#ca99b1" DESTINATION="ID_1404034997" ENDARROW="Default" ENDINCLINATION="-5;81;" ID="Arrow_ID_402256801" STARTARROW="None" STARTINCLINATION="235;22;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1582233568711" ID="ID_1046617766" MODIFIED="1582233574777" TEXT="Lösungen">
|
||||
<node COLOR="#338800" CREATED="1582233577705" ID="ID_1368671019" MODIFIED="1582306571178" TEXT="STL-Iterierbarkeit">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1582233592571" ID="ID_409234723" MODIFIED="1582233639556">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Frage: wollen wir auf <i>noexcept</i> einschränken?
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="help"/>
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1582233691150" ID="ID_860044262" MODIFIED="1582233697555" TEXT="NEIN">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1582233699511" ID="ID_287790035" MODIFIED="1582233717614" TEXT="das ist nicht Teil des Konzepts »Iterierbarkeit«">
|
||||
<node CREATED="1582233730337" ID="ID_1576759110" MODIFIED="1582233744219" TEXT="hier ganz klar "im weitesten Sinne" gemeint"/>
|
||||
<node CREATED="1582233816125" ID="ID_1024965560" MODIFIED="1582233839557" TEXT="Beweis: <bits/range_access.h>">
|
||||
<node CREATED="1582233844361" ID="ID_697050029" MODIFIED="1582233864786" TEXT="Funktion std::begin(X) ist ohne noexcept definiert"/>
|
||||
<node CREATED="1582233871134" ID="ID_439487192" MODIFIED="1582233878481" TEXT="macht auch inhaltlich Sinn so"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1582233905345" ID="ID_374929365" MODIFIED="1582306757303" TEXT="Lösungsansatz-1: beide Varianten explizit prüfen">
|
||||
<linktarget COLOR="#0eaf68" DESTINATION="ID_374929365" ENDARROW="Default" ENDINCLINATION="143;-60;" ID="Arrow_ID_325541082" SOURCE="ID_173149831" STARTARROW="None" STARTINCLINATION="279;23;"/>
|
||||
<icon BUILTIN="back"/>
|
||||
<node CREATED="1582237126809" ID="ID_885223940" MODIFIED="1582237134567" TEXT="das würde den Status-quo einfach reparieren"/>
|
||||
<node CREATED="1582237135080" ID="ID_247923480" MODIFIED="1582237151522" TEXT="dieser ist aber selbst einigermaßen "pragmatisch" und verworren">
|
||||
<node CREATED="1582237183692" ID="ID_898840580" MODIFIED="1582237277357" TEXT="siehe z.B. lib/meta/trait-special.hpp">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<li>
|
||||
als schneller Fix implementiert
|
||||
</li>
|
||||
<li>
|
||||
und tatsächlich nur einmal, für einen Test verwendet
|
||||
</li>
|
||||
<li>
|
||||
eigentlich wird damit das Problem "unter den Teppich gekehrt"
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="smily_bad"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1582237153893" ID="ID_1734163342" MODIFIED="1582237170263" TEXT="...und ich weiß, daß das Thema für C++20 angegangen und aufgeräumt werden muß"/>
|
||||
<node COLOR="#435e98" CREATED="1582305423630" ID="ID_406561498" MODIFIED="1582305474131" TEXT="ist die einzige zur Zeit sinnvoll umsetzbare Lösung">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
"sinnvoll" heißt
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
stabil
|
||||
</li>
|
||||
<li>
|
||||
lesbar
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1582233920415" ID="ID_1234146956" MODIFIED="1582305405142" TEXT="Lösungsansatz-2: umstellen auf RangeTS-Iterierbarkeit">
|
||||
<icon BUILTIN="closed"/>
|
||||
<node CREATED="1582236780720" ID="ID_617011073" MODIFIED="1582236796290" TEXT="welchen Zweck erfüllt dieser Trait?">
|
||||
<node CREATED="1582236798072" ID="ID_626851812" MODIFIED="1582236835100" TEXT="geht es um »Iterierbarket«?"/>
|
||||
<node CREATED="1582236809676" ID="ID_1014412331" MODIFIED="1582236832229" TEXT="oder geht es um STL-Container?"/>
|
||||
</node>
|
||||
<node CREATED="1582237912798" ID="ID_1995184792" MODIFIED="1582237920945" TEXT="alle bisherigen Verwendungen....">
|
||||
<node CREATED="1582237974967" ID="ID_1205441472" MODIFIED="1582238028108" TEXT="...dienen dazu, Lumiera-Itarator und STL-Container einheitlich »iterierbar« zu adaptieren"/>
|
||||
<node CREATED="1582237960985" ID="ID_1470506535" MODIFIED="1582238123532" TEXT="...es gibt gar nicht so viele Verwendungen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
warum...?
|
||||
</p>
|
||||
<p>
|
||||
..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).
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1582305384364" ID="ID_238579581" MODIFIED="1582305402839" TEXT="ist nicht das was wir hier wollen">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1582237046588" ID="ID_400180049" MODIFIED="1582305363418" TEXT="Lösunsansatz-3: ein maßgeschneidertes Concept bauen">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1582237081319" ID="ID_1673821136" MODIFIED="1582237093290" TEXT="bereits im Vorgriff auf C++20 implementiert"/>
|
||||
<node CREATED="1582237094158" ID="ID_206423592" MODIFIED="1582237113383">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
es sollte genau die Eigenschaften abdecken, die wir <b>tatsächlich brauchen</b>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1582305280750" ID="ID_1737226688" MODIFIED="1582305293156" TEXT="hab's versucht">
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
<node CREATED="1582305294632" ID="ID_1508436965" LINK="https://stackoverflow.com/a/16316640/444796" MODIFIED="1582305314720" TEXT="in Anlehnung an (SO)"/>
|
||||
<node CREATED="1582305317917" ID="ID_63672565" MODIFIED="1582305325880" TEXT="wird aber sehr komplex im Detail"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1582305327187" ID="ID_393824782" MODIFIED="1582305337183" TEXT="Abbruch">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1582305338154" ID="ID_529828571" MODIFIED="1582305347714" TEXT="Lösung ist nicht lesbar"/>
|
||||
<node CREATED="1582305348153" ID="ID_1318841418" MODIFIED="1582305360490" TEXT="in 2 Jahren nutzen wir Concepts">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue