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

Class has_insert_value

tests/test_container_helpers.h:76–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74// Detect if type has insert(value) method
75template<typename T>
76class has_insert_value {
77 template<typename C> static auto test(int) -> decltype(fl::declval<C>().insert(fl::declval<fl::shared_ptr<int>>()), fl::true_type());
78 template<typename> static fl::false_type test(...);
79public:
80 static constexpr bool value = fl::is_same<decltype(test<T>(0)), fl::true_type>::value;
81};
82
83// Detect if type has insert(key, value) method (for maps)
84template<typename T>

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected