![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
An opt-out trait to indicate that a range type's member/ADL size() is not a constant-time operation.
More...

Additional Inherited Members | |
Public Types inherited from std::integral_constant< bool, Value >< false > | |
| using | type |
| The type of this class. | |
| using | type |
| The type of this class. | |
| using | value_type |
| The type of the value. | |
| using | value_type |
| The type of the value. | |
Public Member Functions inherited from std::integral_constant< bool, Value >< false > | |
| constexpr | operator value_type () const noexcept |
Implicit conversion to Type. | |
| constexpr | operator value_type () const noexcept |
Implicit conversion to Type. | |
| constexpr | operator value_type () const noexcept |
Implicit conversion to Type. | |
| constexpr | operator value_type () const noexcept |
Implicit conversion to Type. | |
| constexpr auto | operator() () const noexcept -> value_type |
| Nullary function call operator. | |
| constexpr auto | operator() () const noexcept -> value_type |
| Nullary function call operator. | |
| constexpr auto | operator() () const noexcept -> value_type |
| Nullary function call operator. | |
| constexpr auto | operator() () const noexcept -> value_type |
| Nullary function call operator. | |
Static Public Attributes inherited from std::integral_constant< bool, Value >< false > | |
| static constexpr value_type | value |
| The constant. | |
| static constexpr value_type | value |
| The constant. | |
| static constexpr value_type | value |
| The constant. | |
| static constexpr value_type | value |
| The constant. | |
An opt-out trait to indicate that a range type's member/ADL size() is not a constant-time operation.
| Rng | The range type to check. |
Users should specialize this trait for their range types to derive from std::true_type when the type's member or ADL size() cannot be assumed to run in constant time. The primary template derives from std::false_type .
When the trait is true , arene::base::ranges::size ignores any member and ADL size() . It may still obtain the size from end() - begin() when the iterator/sentinel pair models a sized sentinel, as that subtraction is assumed to be a constant-time operation.