diff options
author | Determinant <ted.sybil@gmail.com> | 2018-07-12 17:39:48 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2018-07-12 17:39:48 -0400 |
commit | 33faa8e355dc47a126790f1ea3e52d1813aedc69 (patch) | |
tree | 151c047fd4b8b8a10be2ca45931c482ceb79b451 /include/salticidae/type.h | |
parent | a0ea3b5fb7eaedb9b6789657bed998585bb98b77 (diff) |
support array type in smart pointers
Diffstat (limited to 'include/salticidae/type.h')
-rw-r--r-- | include/salticidae/type.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/salticidae/type.h b/include/salticidae/type.h index edf38a6..d5834a5 100644 --- a/include/salticidae/type.h +++ b/include/salticidae/type.h @@ -54,13 +54,16 @@ template<> inline uint16_t letoh<uint16_t>(uint16_t x) { return le16toh(x); } template<> inline uint32_t letoh<uint32_t>(uint32_t x) { return le32toh(x); } template<> inline uint64_t letoh<uint64_t>(uint64_t x) { return le64toh(x); } +template<typename... > +using void_t = void; + template <typename T, typename = void> struct is_ranged : std::false_type {}; template <typename T> struct is_ranged<T, - std::void_t<decltype(std::declval<T>().begin()), - decltype(std::declval<T>().end())>> : std::true_type {}; + void_t<decltype(std::declval<T>().begin()), + decltype(std::declval<T>().end())>> : std::true_type {}; } |