You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
optional.hpp seems to rely only on the C++ standard version in use to choose between the std::in_place facility from the standard library or its own implementation.
However, simply compiling in C++17 mode doesn't guarantee that the standard library contains these facilities. For instance, this detection technique fails on Ubuntu 16.04 when compiling with clang-5.0 (and the default libstdc++):
$ clang++-5.0 -xc++ -std=c++17 -ferror-limit=5 -c -o /dev/null - <<< '#include "optional.hpp"'
In file included from <stdin>:1:
./optional.hpp:94:12: error: no member named 'in_place' in namespace 'std'
using std::in_place;
~~~~~^
./optional.hpp:95:12: error: no member named 'in_place_type' in namespace 'std'
using std::in_place_type;
~~~~~^
./optional.hpp:96:12: error: no member named 'in_place_index' in namespace 'std'
using std::in_place_index;
~~~~~^
./optional.hpp:97:12: error: no member named 'in_place_t' in namespace 'std'
using std::in_place_t;
~~~~~^
./optional.hpp:98:12: error: no member named 'in_place_type_t' in namespace 'std'
using std::in_place_type_t;
~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 errors generated.
The text was updated successfully, but these errors were encountered:
optional.hpp
seems to rely only on the C++ standard version in use to choose between thestd::in_place
facility from the standard library or its own implementation.optional-lite/include/nonstd/optional.hpp
Lines 88 to 99 in 86db12f
However, simply compiling in C++17 mode doesn't guarantee that the standard library contains these facilities. For instance, this detection technique fails on Ubuntu 16.04 when compiling with clang-5.0 (and the default libstdc++):
The text was updated successfully, but these errors were encountered: