forked from boostorg/type_traits
Implement is_bounded_array and is_unbounded_array
This commit is contained in:
1 parent
b8e0395cd8
commit
d8bdd309d7
8 files changed
+229
No files matched your search
@@ -7,6 +7,10 @@
|
||||
|
||||
[section:history History]
|
||||
|
||||
[h4 Boost-1.70.0]
|
||||
|
||||
* Added new traits __is_bounded_array, __is_unbounded_array.
|
||||
|
||||
[h4 Boost-1.68.0]
|
||||
|
||||
* Added support for detecting trivial moves on clang.
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[/
|
||||
Copyright 2018 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License,
|
||||
Version 1.0. (See accompanying file LICENSE_1_0.txt
|
||||
or copy at http://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
||||
[section:is_bounded_array is_bounded_array]
|
||||
|
||||
template<class T>
|
||||
struct is_bounded_array
|
||||
: __tof { };
|
||||
|
||||
__inherit If T is a (possibly cv-qualified) array type of known bound, then
|
||||
inherits from __true_type, otherwise inherits from __false_type.
|
||||
|
||||
__header `#include <boost/type_traits/is_bounded_array.hpp>`
|
||||
|
||||
[all_compilers]
|
||||
|
||||
__examples
|
||||
|
||||
[:`is_bounded_array<int[2]>` inherits from `__true_type`.]
|
||||
|
||||
[:`is_bounded_array<char[2][3]>::type` is the type `__true_type`.]
|
||||
|
||||
[:`is_bounded_array<double[2]>::value` is an integral constant expression that
|
||||
evaluates to /true/.]
|
||||
|
||||
[:`is_bounded_array<T>::value_type` is the type `bool`.]
|
||||
|
||||
[endsect]
|
||||
@@ -0,0 +1,34 @@
|
||||
[/
|
||||
Copyright 2018 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License,
|
||||
Version 1.0. (See accompanying file LICENSE_1_0.txt
|
||||
or copy at http://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
||||
[section:is_unbounded_array is_unbounded_array]
|
||||
|
||||
template<class T>
|
||||
struct is_unbounded_array
|
||||
: __tof { };
|
||||
|
||||
__inherit If T is a (possibly cv-qualified) array type of unknown bound, then
|
||||
inherits from __true_type, otherwise inherits from __false_type.
|
||||
|
||||
__header `#include <boost/type_traits/is_unbounded_array.hpp>`
|
||||
|
||||
[all_compilers]
|
||||
|
||||
__examples
|
||||
|
||||
[:`is_unbounded_array<int[]>` inherits from `__true_type`.]
|
||||
|
||||
[:`is_unbounded_array<char[][3]>::type` is the type `__true_type`.]
|
||||
|
||||
[:`is_unbounded_array<double[]>::value` is an integral constant expression that
|
||||
evaluates to /true/.]
|
||||
|
||||
[:`is_unbounded_array<T>::value_type` is the type `bool`.]
|
||||
|
||||
[endsect]
|
||||
@@ -51,6 +51,8 @@
|
||||
[def __is_rvalue_reference [link boost_typetraits.reference.is_rvalue_reference is_rvalue_reference]]
|
||||
[def __is_member_pointer [link boost_typetraits.reference.is_member_pointer is_member_pointer]]
|
||||
[def __is_array [link boost_typetraits.reference.is_array is_array]]
|
||||
[def __is_bounded_array [link boost_typetraits.reference.is_bounded_array is_bounded_array]]
|
||||
[def __is_unbounded_array [link boost_typetraits.reference.is_unbounded_array is_unbounded_array]]
|
||||
[def __is_union [link boost_typetraits.reference.is_union is_union]]
|
||||
[def __is_class [link boost_typetraits.reference.is_class is_class]]
|
||||
[def __is_enum [link boost_typetraits.reference.is_enum is_enum]]
|
||||
@@ -385,6 +387,7 @@ See __has_trivial_constructor.
|
||||
[include is_array.qbk]
|
||||
[include is_assignable.qbk]
|
||||
[include is_base_of.qbk]
|
||||
[include is_bounded_array.qbk]
|
||||
[include is_class.qbk]
|
||||
[include is_complete.qbk]
|
||||
[include is_complex.qbk]
|
||||
@@ -424,6 +427,7 @@ See __has_trivial_constructor.
|
||||
[include is_scalar.qbk]
|
||||
[include is_signed.qbk]
|
||||
[include is_stateless.qbk]
|
||||
[include is_unbounded_array.qbk]
|
||||
[include is_union.qbk]
|
||||
[include is_unsigned.qbk]
|
||||
[include is_virtual_base_of.qbk]
|
||||
|
||||
Reference in new issue
Block a user