Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template call_if_statement

boost::contract::call_if_statement — Select compilation and execution of functor template calls using a static boolean predicate.

Synopsis

// In header: <boost/contract/call_if.hpp>

template<bool Pred, typename Then, typename ThenResult = internal_type> 
struct call_if_statement {
};

Description

This class template has no members because it is never used directly, it is only used via its specializations. Usually this class template is instantiated only via the return value of boost::contract::call_if and boost::contract::call_if_c.

See Also:

Assertion Requirements

Template Parameters

  1. bool Pred

    Static boolean predicate that selects which functor template call to compile and execute.

  2. typename Then

    Type of the functor template to call if the static predicate Pred is true.

  3. typename ThenResult = internal_type

    Return type of then-branch functor template call (this is usually automatically deduced by this library so it is never explicitly specified by the user, and that is why it is often marked as internal_type in this documentation).


PrevUpHomeNext