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

Class has_capacity

tests/test_container_helpers.h:467–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465// Detect if type has capacity()
466template<typename T>
467class has_capacity {
468 template<typename C> static auto test(int) -> decltype(
469 fl::declval<C>().capacity(),
470 fl::true_type()
471 );
472 template<typename> static fl::false_type test(...);
473public:
474 static constexpr bool value = fl::is_same<decltype(test<T>(0)), fl::true_type>::value;
475};
476
477// Detect if type has max_size()
478template<typename T>

Callers

nothing calls this directly

Calls 1

capacityMethod · 0.45

Tested by

no test coverage detected