docs/concepttf_1_1StringLike.html
| | Taskflow: A General-purpose Task-parallel Programming System |
Loading...
Searching...
No Matches
tf::StringLike Concept Reference
concept that determines if a type is string-like More...
#include <taskflow/core/graph.hpp>
template<typename T>
concept tf::StringLike = std::convertible_to<T, std::string_view>
concept that determines if a type is string-like
Definition graph.hpp:162
concept that determines if a type is string-like
A type satisfies tf::StringLike if it is convertible to std::string_view, including:
static_assert(tf::StringLike<std::string>);
static_assert(tf::StringLike<std::string_view>);
static_assert(tf::StringLike<const char*>);
// custom type with implicit conversion
struct MyString {
operator std::string_view() const { return _data; }
std::string _data;
};
static_assert(tf::StringLike<MyString>);