C++17: fix detector for function signatures
failure was likewise caused by `noexcept` being part of the signature type now
This commit is contained in:
parent
8c12e88fd3
commit
00c9ecb659
7 changed files with 46 additions and 32 deletions
|
|
@ -194,7 +194,6 @@ namespace util {
|
|||
using Coll = typename lib::meta::Strip<CON>::TypePlain;
|
||||
_RangeIter<Coll> range(std::forward<CON>(coll));
|
||||
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
auto strings = stringify (std::move (range.iter));
|
||||
if (!strings) return "";
|
||||
|
||||
|
|
@ -206,8 +205,6 @@ namespace util {
|
|||
size_t len = buffer.str().length();
|
||||
ASSERT (len >= delim.length());
|
||||
return buffer.str().substr(0, len - delim.length());
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
return "bääh";
|
||||
}
|
||||
|
||||
template<class X>
|
||||
|
|
|
|||
|
|
@ -129,6 +129,13 @@ namespace meta{
|
|||
using Sig = RET(ARGS...);
|
||||
using Functor = std::function<Sig>;
|
||||
};
|
||||
|
||||
/** Specialisation to strip `noexcept` from the signature */
|
||||
template<typename RET, typename...ARGS>
|
||||
struct _Fun<RET(ARGS...) noexcept>
|
||||
: _Fun<RET(ARGS...)>
|
||||
{ };
|
||||
|
||||
/** Specialisation for using a function pointer */
|
||||
template<typename SIG>
|
||||
struct _Fun<SIG*>
|
||||
|
|
@ -153,6 +160,12 @@ namespace meta{
|
|||
: _Fun<RET(ARGS...)>
|
||||
{ };
|
||||
|
||||
/** Specialisation to deal with member pointer to noexcept function */
|
||||
template<class C, typename RET, typename...ARGS>
|
||||
struct _Fun<RET (C::*) (ARGS...) noexcept>
|
||||
: _Fun<RET(ARGS...)>
|
||||
{ };
|
||||
|
||||
/** Specialisation to handle member pointer to const function;
|
||||
* indirectly this specialisation also handles lambdas,
|
||||
* as redirected by the main template (via `decltype`) */
|
||||
|
|
|
|||
|
|
@ -408,10 +408,7 @@ namespace test{
|
|||
|
||||
mutator1.injectNew (ATTRIB1);
|
||||
CHECK (!isnil (target));
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
CHECK (contains(join(target), "≺α∣1≻"));
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
UNIMPLEMENTED ("C++17");
|
||||
|
||||
mutator1.injectNew (ATTRIB3);
|
||||
mutator1.injectNew (ATTRIB3);
|
||||
|
|
@ -420,7 +417,6 @@ namespace test{
|
|||
mutator1.injectNew (CHILD_T);
|
||||
CHECK (mutator1.completeScope());
|
||||
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
auto contents = stringify(eachElm(target));
|
||||
CHECK ("≺α∣1≻" == *contents);
|
||||
++contents;
|
||||
|
|
@ -435,8 +431,6 @@ namespace test{
|
|||
CHECK (contains(*contents, "∣78:56:34.012≻"));
|
||||
++contents;
|
||||
CHECK (isnil (contents));
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
UNIMPLEMENTED ("C++17");
|
||||
|
||||
cout << "injected......" << join(target) <<endl;
|
||||
|
||||
|
|
@ -504,7 +498,6 @@ namespace test{
|
|||
CHECK (mutator2.completeScope()); // no pending elements left, everything resolved
|
||||
|
||||
// verify reordered shape
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
contents = stringify(eachElm(target));
|
||||
CHECK ("≺α∣1≻" == *contents);
|
||||
++contents;
|
||||
|
|
@ -521,7 +514,6 @@ namespace test{
|
|||
CHECK (contains(*contents, "∣b≻"));
|
||||
++contents;
|
||||
CHECK (isnil (contents));
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
|
||||
cout << "Content after reordering...."
|
||||
<< join(target) <<endl;
|
||||
|
|
@ -625,7 +617,6 @@ namespace test{
|
|||
cout << "Sub|" << join(subScopes[SUB_NODE.idi]) <<endl; // some new content into our implementation defined sub scope!
|
||||
|
||||
// verify contents of nested scope after mutation
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
contents = stringify(eachElm(subScopes[SUB_NODE.idi]));
|
||||
CHECK ("≺type∣ξ≻" == *contents);
|
||||
++contents;
|
||||
|
|
@ -636,7 +627,6 @@ namespace test{
|
|||
CHECK (contains(*contents, "∣a≻"));
|
||||
++contents;
|
||||
CHECK (isnil (contents));
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
|
||||
|
||||
// now back to parent scope....
|
||||
|
|
@ -654,7 +644,6 @@ namespace test{
|
|||
cout << "Sub|" << join(subScopes[ATTRIB_NODE.idi]) <<endl;
|
||||
|
||||
// verify contents of this second nested scope
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
contents = stringify(eachElm(subScopes[ATTRIB_NODE.idi]));
|
||||
CHECK ("≺type∣ζ≻" == *contents);
|
||||
++contents;
|
||||
|
|
@ -665,7 +654,6 @@ namespace test{
|
|||
CHECK (contains(*contents, "∣a≻"));
|
||||
++contents;
|
||||
CHECK (isnil (contents));
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
|
||||
|
||||
// back to parent scope....
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@ namespace test {
|
|||
checkStringify()
|
||||
{
|
||||
// use as transformer within an (iterator) pipeline
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
auto ss = stringify (eachNum (1.11, 10.2));
|
||||
|
||||
CHECK (ss);
|
||||
|
|
@ -152,8 +151,6 @@ namespace test {
|
|||
res += s;
|
||||
|
||||
CHECK (res == "..2.113.114.115.116.117.118.119.1110.11");
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
UNIMPLEMENTED ("C++17");
|
||||
|
||||
|
||||
using VecS = vector<string>;
|
||||
|
|
@ -169,7 +166,6 @@ namespace test {
|
|||
++nn;
|
||||
CHECK (6 == *nn);
|
||||
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
auto sn = stringify (nn);
|
||||
CHECK ("6" == *sn);
|
||||
++sn;
|
||||
|
|
@ -186,8 +182,6 @@ namespace test {
|
|||
CHECK ("9" == *sn);
|
||||
++sn;
|
||||
CHECK (isnil (sn));
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
UNIMPLEMENTED ("C++17");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -312,7 +312,6 @@ namespace test{
|
|||
void
|
||||
verifyFunctionResult()
|
||||
{
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
FunctionResult<int(void)> randomVal (std::rand);
|
||||
|
||||
// function was never invoked, thus the remembered result is NIL
|
||||
|
|
@ -331,8 +330,6 @@ namespace test{
|
|||
CHECK (v2 == *randomVal);
|
||||
CHECK (v2 == *randomVal);
|
||||
CHECK (v1 != *randomVal);
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
UNIMPLEMENTED ("C++17");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -496,11 +496,9 @@ namespace test{
|
|||
{
|
||||
EventLog::ArgSeq strings;
|
||||
strings.reserve (argData.childSize());
|
||||
#if false //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
append_all (transformIterator (childData (argData.scope())
|
||||
, util::toString<DataCap>)
|
||||
,strings);
|
||||
#endif //////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1138 : sort out C++17 compatibility
|
||||
return strings;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45594,8 +45594,8 @@
|
|||
</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 COLOR="#435e98" CREATED="1581995421239" ID="ID_1730281364" MODIFIED="1582312452693" TEXT="mutmaßliche Probleme">
|
||||
<icon BUILTIN="info"/>
|
||||
<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">
|
||||
|
|
@ -45643,17 +45643,20 @@
|
|||
</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 COLOR="#435e98" CREATED="1581995458449" ID="ID_524595490" MODIFIED="1582312410611" TEXT="meta::_Fun Type-Deduction greift nicht mehr">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<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 CREATED="1582312412651" ID="ID_1422313569" MODIFIED="1582312440377" TEXT="ebenfalls durch Spezialisierung auf noexcept lösbar">
|
||||
<arrowlink COLOR="#8dbd97" DESTINATION="ID_698919272" ENDARROW="Default" ENDINCLINATION="551;0;" ID="Arrow_ID_1462827757" STARTARROW="None" STARTINCLINATION="551;0;"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582226930039" ID="ID_520524824" MODIFIED="1582226984574" TEXT="Union-Initialisierung on-the-fly">
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582226930039" ID="ID_520524824" MODIFIED="1582312457500" 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"/>
|
||||
<icon BUILTIN="hourglass"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1582233568711" ID="ID_1046617766" MODIFIED="1582233574777" TEXT="Lösungen">
|
||||
|
|
@ -45797,6 +45800,30 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1582312227006" ID="ID_1679109428" MODIFIED="1582312398197" TEXT="Funktions-Detektor">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1582312235632" ID="ID_1383769424" MODIFIED="1582312241748" TEXT="es ist ebenfalls noexcept">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1582312256096" ID="ID_698919272" MODIFIED="1582312433072" TEXT="läßt sich mit forwarding-specialisation wegstrippen">
|
||||
<linktarget COLOR="#8dbd97" DESTINATION="ID_698919272" ENDARROW="Default" ENDINCLINATION="551;0;" ID="Arrow_ID_1462827757" SOURCE="ID_1422313569" STARTARROW="None" STARTINCLINATION="551;0;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node CREATED="1582312269622" ID="ID_1014206981" LINK="https://stackoverflow.com/a/55701361/444796" MODIFIED="1582312395433" TEXT="Gefahr der kombinatorischen Explosion">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
mit const und volatile...
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue