Skip to content

Enhancement: libc++ provides string_view for all C++ language levels #2

@mclow

Description

@mclow

#define ABSL_HAVE_STD_STRING_VIEW 1

Yes, even C++03. :-)

You can test this thus:

#ifdef __has_include
# if __has_include(<string_view>)
#  include <string_view>
#  if __cplusplus >= 201703L || defined(_LIBCPP_STRING_VIEW)
#   define ABSL_HAVE_STD_STRING_VIEW 1
#  endif
# endif
#endif

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions