Skip to content

compile error with clang 5.0 -std=c++1z and no string_view #939

@phlptp

Description

@phlptp

Bug Report

Compile error on clang 5.0 with -std=c++1z

In file included from XXXX.cpp:32:
XXXX/json.hpp:9913:66: error: no type named
      'string_view' in namespace 'std'
  ...and not std::is_same<ValueType, typename std::string_view>::value
                                     ~~~~~~~~~~~~~~^~~~~~~~~~~

All other compilers tested thus far work fine.

my fix was to simply comment out that line since I wasn't using std::string_view, but but I am guessing there is a reason for including string_view in the enable_if statement so I don't think my fix is a valid solution and I am not familiar enough with the structures used to integrate a check for the existence of string_view before using it in an is_same template.

The other options was to include <string_view> if JSON_HAS_CPP_17 is enabled but that didn't seem proper either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: duplicatethe issue is a duplicate; refer to the linked issue instead

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions