DryChem
1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
isReversibleContainer.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: isReversibleContainer.hpp
5
// Author: crdrisko
6
// Date: 09/23/2020-07:41:46
7
// Description: A type trait for determining whether a type T meets the requirements of a reversible container
8
9
#ifndef DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_META_TRAITS_CONTAINERTRAITS_ISREVERSIBLECONTAINER_HPP
10
#define DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_META_TRAITS_CONTAINERTRAITS_ISREVERSIBLECONTAINER_HPP
11
12
#include <type_traits>
13
#include <utility>
14
15
#include "
common-utils/meta/traits/containerTraits/isContainer.hpp
"
16
17
namespace
CppUtils::Meta
18
{
25
template
<
typename
,
typename
= std::
void
_t<>>
26
struct
is_reversible_container
: std::false_type
27
{
28
};
29
36
template
<
typename
T>
37
struct
is_reversible_container
<T, std::void_t<typename T::reverse_iterator,
38
typename T::const_reverse_iterator,
39
decltype(std::declval<T>().rbegin()),
40
decltype(std::declval<T>().rend()),
41
decltype(std::declval<T>().crbegin()),
42
decltype(std::declval<T>().crend())>> :
is_container
<T>
43
{
44
};
45
47
template
<
typename
T>
48
constexpr
bool
is_reversible_container_v
=
is_reversible_container<T>::value
;
49
}
// namespace CppUtils::Meta
50
51
#endif
isContainer.hpp
CppUtils::Meta
Definition
frontList.hpp:13
CppUtils::Meta::is_reversible_container_v
constexpr bool is_reversible_container_v
Convenience variable template for ease-of-use.
Definition
isReversibleContainer.hpp:48
CppUtils::Meta::is_container
Definition
isContainer.hpp:25
CppUtils::Meta::is_reversible_container
Definition
isReversibleContainer.hpp:27
common-utilities
include
common-utils
meta
traits
containerTraits
isReversibleContainer.hpp
Generated on Thu Feb 13 2025 11:55:13 for DryChem by
1.13.2