11 #ifndef INCLUDE_MOLASSEMBLER_TEMPLE_CONTAINER_TRAITS_H
12 #define INCLUDE_MOLASSEMBLER_TEMPLE_CONTAINER_TRAITS_H
19 namespace Molassembler {
37 template<
class Container>
38 static auto testHasInsert(
int)
41 std::declval<Container>().insert(
43 getValueType<Container>
49 template<
class Container>
50 static auto testHasInsert(
long) -> std::false_type;
53 template<
class Container>
54 struct hasInsert : decltype(Detail::testHasInsert<Container>(0)){};
57 template<
class Container>
58 static auto testHasPushBack(
int)
61 std::declval<Container>().push_back(
63 getValueType<Container>
69 template<
class Container>
70 static auto testHasPushBack(
long) -> std::false_type;
73 template<
class Container>
74 struct hasPushBack : decltype(Detail::testHasPushBack<Container>(0)){};
77 template<
class Container>
78 static auto testHasEmplace(
int)
81 std::declval<Container>().emplace(
83 getValueType<Container>
89 template<
class Container>
90 static auto testHasEmplace(
long) -> std::false_type;
93 template<
class Container>
94 struct hasEmplace : decltype(Detail::testHasEmplace<Container>(0)){};
97 template<
class Container>
98 static auto testHasEmplaceBack(
int)
101 std::declval<Container>().emplace_back(
103 getValueType<Container>
109 template<
class Container>
110 static auto testHasEmplaceBack(
long) -> std::false_type;
113 template<
class Container>
118 template<
class Container>
119 static auto testHasSize(
int)
122 std::declval<Container>().size()
126 template<
class Container>
127 static auto testHasSize(
long) -> std::false_type;
130 template<
class Container>
131 struct hasSize : decltype(Detail::testHasSize<Container>(0)){};
134 template<
class Container>
135 static auto testHasReserve(
int)
138 std::declval<Container>().reserve()
142 template<
class Container>
143 static auto testHasReserve(
long) -> std::false_type;
146 template<
class Container>
147 struct hasReserve : decltype(Detail::testHasReserve<Container>(0)){};
Definition: ContainerTraits.h:74
Definition: ContainerTraits.h:94
Definition: ContainerTraits.h:131
Definition: ContainerTraits.h:114
Definition: ContainerTraits.h:28
Provides a few basic function and container traits.
Definition: ContainerTraits.h:54
Definition: ContainerTraits.h:147