json: Compilation Error on Clang 5.0 Upgrade
Upgrading to Clang+±5.0 on Travis-CI Trusty is producing the following error:
json/src/json.hpp:9869:66: error: no type named 'string_view' in namespace 'std'
...and not std::is_same<ValueType, typename std::string_view>::value
Also tested on Ubuntu 16.04 Clang+±5.0 standalone without the rest of the project and still failing with the same error. g++ working fine on both systems.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 25 (18 by maintainers)
Commits related to this issue
- supposed fix for clang builds see https://github.com/nlohmann/json/issues/735#issuecomment-340165556 for details — committed to rbns/ews-cpp by deleted user 5 years ago
One workaround (though quite brittle), would be:
Then you include this file instead of including
json.hpp
directly. Of course once your distribution ships a library with C++17 support, you will not need that workaround anymore.Could we use the
__has_include
feature to detect that?