#pragma once #include #include namespace utils { namespace detail { template struct has_member_reserve { template static U& ref(); template static std::true_type check(decltype(ref().reserve(size_t{}))*); template static std::false_type check(...); static constexpr bool value = decltype(check>(nullptr))::value; }; template constexpr bool has_member_reserve_v = has_member_reserve::value; } // namespace detail template