DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
isAllocatorAwareContainer.hpp
Go to the documentation of this file.
1// Copyright (c) 2020-2025 Cody R. Drisko. All rights reserved.
2// Licensed under the MIT License. See the LICENSE file in the project root for more information.
3//
4// Name: isAllocatorAwareContainer.hpp
5// Author: crdrisko
6// Date: 09/23/2020-07:41:26
7// Description: A type trait for determining whether a type T meets the requirements of an allocator-aware container
8
9#ifndef DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_META_TRAITS_CONTAINERTRAITS_ISALLOCATORAWARECONTAINER_HPP
10#define DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_META_TRAITS_CONTAINERTRAITS_ISALLOCATORAWARECONTAINER_HPP
11
12#include <type_traits>
13
15
16namespace CppUtils::Meta
17{
24 template<typename, typename = std::void_t<>>
25 struct is_allocator_aware_container : std::false_type
26 {
27 };
28
35 template<typename T>
36 struct is_allocator_aware_container<T, std::void_t<typename T::allocator_type>> : is_container<T>
37 {
38 };
39
41 template<typename T>
43} // namespace CppUtils::Meta
44
45#endif
Definition frontList.hpp:13
constexpr bool is_allocator_aware_container_v
Convenience variable template for ease-of-use.
Definition isAllocatorAwareContainer.hpp:42
Definition isAllocatorAwareContainer.hpp:26
Definition isContainer.hpp:25