C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_4_1::logical_or< E1, E2 > Struct Template Reference

Short-circuit logical OR evaluation of two boolean values. More...

#include <exercise-4-1.hpp>

Detailed Description

template<typename E1, typename E2>
struct exercise_4_1::logical_or< E1, E2 >

Short-circuit logical OR evaluation of two boolean values.

We're assuming that E1 has a boolean "value" member, but that it probably isn't simply a boost::mpl::bool_ type. Since the specializations operate on bool_, we extract the value here, and pass it down throw a bool_.

Template Parameters
E1An expression that must at least have a boolean "value" member.
E2An expression that must at least have a boolean "value" member.

Definition at line 46 of file exercise-4-1.hpp.


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