MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / is_like_std_string

Class is_like_std_string

extlibs/fmt/include/fmt/ranges.h:79–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78/// Return true value if T has std::string interface, like std::string_view.
79template <typename T> class is_like_std_string {
80 template <typename U>
81 static auto check(U* p)
82 -> decltype((void)p->find('a'), p->length(), (void)p->data(), int());
83 template <typename> static void check(...);
84
85 public:
86 static FMT_CONSTEXPR_DECL const bool value =
87 is_string<T>::value || !std::is_void<decltype(check<T>(nullptr))>::value;
88};
89
90template <typename Char>
91struct is_like_std_string<fmt::basic_string_view<Char>> : std::true_type {};

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected