Make string support even more generic

Ported from 57354de831
Closes #2084
This commit is contained in:
David Gauchard
2024-05-01 14:06:30 +02:00
committed by Benoit Blanchon
parent ece4d030a8
commit 82de20ee14
2 changed files with 4 additions and 4 deletions
+3 -4
View File
@@ -38,16 +38,15 @@ struct has_data<T,
const char*>::value>::type>
: true_type {};
// size_t length() const
// unsigned int length() const
// - String
template <class T, class = void>
struct has_length : false_type {};
template <class T>
struct has_length<
T, typename enable_if<
is_same<decltype(declval<const T>().length()), size_t>::value>::type>
struct has_length<T, typename enable_if<is_unsigned<
decltype(declval<const T>().length())>::value>::type>
: true_type {};
// size_t size() const