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 for the latest Boost documentation.
PrevUpHomeNext

Function template make_scope_fail

boost::scope::make_scope_fail — Creates a scope fail with given callable function objects.

Synopsis

// In header: <boost/scope/scope_fail.hpp>


template<typename F, typename C> 
  scope_fail< typename std::decay< F >::type, typename std::decay< C >::type > 
  make_scope_fail(F && func, C && cond, bool active = true);

Description

Effects: Constructs a scope guard as if by calling scope_fail< std::decay_t< F >, std::decay_t< C > >( std::forward< F >(func), std::forward< C >(cond), active).

Parameters:

active

Indicates whether the scope guard should be active upon construction.

cond

The callable failure condition function object.

func

The callable action function object to invoke on destruction.


PrevUpHomeNext