mitteLib
Loading...
Searching...
No Matches
mlab::explicit_bool Struct Reference

#include <bin_data.hpp>

Public Member Functions

template<class T , class = std::enable_if_t<std::is_same_v<T, bool>>>
constexpr explicit_bool (T v_)
 
constexpr operator bool () const
 

Public Attributes

bool v
 

Detailed Description

Structure that can only be constructed from a bool. Cannot get an int, or a const char *. This prevents sinking various values into a bool accidentally.

Constructor & Destructor Documentation

◆ explicit_bool()

template<class T , class = std::enable_if_t<std::is_same_v<T, bool>>>
mlab::explicit_bool::explicit_bool ( T v_)
inlineconstexpr

Member Function Documentation

◆ operator bool()

mlab::explicit_bool::operator bool ( ) const
inlineexplicitconstexpr

Member Data Documentation

◆ v

bool mlab::explicit_bool::v

The documentation for this struct was generated from the following file: