Closed atomicflag closed 6 years ago
You are right, I added it in bd21f701a03ad6cbe291d32312672ee492e0f755
In fact the intention was to not include it explicitly - it's up to the user if they want to include it
That breaks things, because
template<typename T>
inline auto convertInto( std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE<T>& target ) -> ParserResult {
T temp;
auto result = convertInto( source, temp );
if( result )
target = std::move(temp);
return result;
}
expects whatever type CLARA_CONFIG_OPTIONAL_TYPE
changes into to exist. If it doesn't, it will not compile, so all users would have to add #include <optional>
to prevent Clara from breaking with -std=c++17
...
It just so happens that for libstdc++7 <optional>
is included transitively, but that does not have to always be the case.
Yes, you're right - this is the automatic detection - I missed that. It should be included here.
https://github.com/catchorg/Clara/blob/adb5ec3a5c20defc80286fd6e8c14aeef10fdcd7/include/clara.hpp#L21-L27
<optional>
should probably be included here.