C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_4_2::logical_or5< E1, E2, E3, E4, E5 > Struct Template Reference

Short-circuit logical OR evaluation for up to five boolean values. More...

#include <exercise-4-2.hpp>

Detailed Description

template<typename E1, typename E2, typename E3 = boost::mpl::false_, typename E4 = boost::mpl::false_, typename E5 = boost::mpl::false_>
struct exercise_4_2::logical_or5< E1, E2, E3, E4, E5 >

Short-circuit logical OR evaluation for up to five 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
E1..E5An expression that must at least have a boolean "value" member.

Definition at line 53 of file exercise-4-2.hpp.


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