MCPcopy Create free account
hub / github.com/FastLED/FastLED / has_insert_key_value

Class has_insert_key_value

tests/test_container_helpers.h:85–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83// Detect if type has insert(key, value) method (for maps)
84template<typename T>
85class has_insert_key_value {
86 template<typename C> static auto test(int) -> decltype(fl::declval<C>().insert(0, fl::declval<fl::shared_ptr<int>>()), fl::true_type());
87 template<typename> static fl::false_type test(...);
88public:
89 static constexpr bool value = fl::is_same<decltype(test<T>(0)), fl::true_type>::value;
90};
91
92// Detect if type has operator[] for assignment
93template<typename T>

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected