C++Spec 1.1.0
BDD testing for C++
Loading...
Searching...
No Matches
CppSpec::Util::is_string_like Concept Reference

Checks whether T is text that CppSpec::string_view_of() can view: a C string, or a type that converts to std::string_view, such as std::string and std::string_view. More...

#include <util.hpp>

Concept definition

template<typename T>
concept is_string_like = is_c_string<T> || std::convertible_to<const std::remove_cvref_t<T>&, std::string_view>
Checks whether T is a C string: a pointer to char, const or not, or a char array, which decays to one...
Definition util.hpp:152
Checks whether T is text that CppSpec::string_view_of() can view: a C string, or a type that converts...
Definition util.hpp:201

Detailed Description

Checks whether T is text that CppSpec::string_view_of() can view: a C string, or a type that converts to std::string_view, such as std::string and std::string_view.

Template Parameters
Ta type to check