General Utility Library for C++17 25.4.1
traits.h
Go to the documentation of this file.
1
24#ifndef GUL17_TRAITS_H_
25#define GUL17_TRAITS_H_
26
27#include <functional> // for std::invoke on C++17 compilers
28#include <type_traits>
29#include <utility>
30
31#include "gul17/internal.h"
32
33namespace gul17 {
34
55template <typename T, typename = int>
56struct IsContainerLike : std::false_type { };
57
58template <typename T>
59struct IsContainerLike <T,
60 typename std::enable_if_t<true,
61 decltype(std::declval<T>().cbegin(),
62 std::declval<T>().cend(),
63 std::declval<typename T::value_type>(),
64 0)
65 >>
66 : std::true_type { };
67
77template <typename T>
78using remove_cvref = typename std::remove_cv<std::remove_reference_t<T>>;
79
89template <typename T>
91
93
94} // namespace gul17
95
96#endif
97
98// vi:ts=4:sw=4:sts=4:et
auto constexpr bit_set(unsigned bit) noexcept -> ReturnT
Set a bit in an integral type.
Definition bit_manip.h:121
typename std::remove_cv< std::remove_reference_t< T > > remove_cvref
A template metafunction that removes const, volatile, and reference qualifiers from a type.
Definition traits.h:78
typename remove_cvref< T >::type remove_cvref_t
A template metafunction that removes const, volatile, and reference qualifiers from a type.
Definition traits.h:90
Definition of macros used internally by GUL.
Namespace gul17 contains all functions and classes of the General Utility Library.
Definition doxygen.h:26
Helper type trait object to determine if a type is a container.
Definition traits.h:56