sparrow ..
Loading...
Searching...
No Matches
sparrow::mpl::boolean_like Concept Reference

Concept for boolean-like types. More...

#include <mp_utils.hpp>

Concept definition

template<class T>
concept sparrow::mpl::boolean_like = std::is_assignable_v<std::add_lvalue_reference_t<std::decay_t<T>>, bool>
and requires { static_cast<bool>(std::declval<T>()); }
Concept for boolean-like types.
Definition mp_utils.hpp:916

Detailed Description

Concept for boolean-like types.

This concept matches types that can be converted to and assigned from bool, without requiring implicit conversion constructors.

Template Parameters
TType to check
Postcondition
True if T can be assigned from bool and converted to bool

Definition at line 916 of file mp_utils.hpp.