GCC Middle and Back End API Reference
opt_result Class Reference

#include <opt-problem.h>

Inheritance diagram for opt_result:
Collaboration diagram for opt_result:

Public Types

typedef bool wrapped_t
 

Public Member Functions

static opt_result if (dump_enabled_p())
 
return opt_result (false, problem)
 
 operator wrapped_t () const
 
wrapped_t get_result () const
 
opt_problemget_problem () const
 

Static Public Member Functions

static opt_result success ()
 
static opt_result failure_at (const dump_location_t &loc, const char *fmt,...) ATTRIBUTE_GCC_DUMP_PRINTF(2
 
template<typename S >
static opt_result propagate_failure (opt_wrapper< S > other)
 

Private Member Functions

 opt_result (wrapped_t result, opt_problem *problem)
 

Private Attributes

wrapped_t m_result
 

Detailed Description

Subclass of opt_wrapper<T> for bool, where
- true signifies "success", and
- false signifies "failure"
whilst effectively propagating an opt_problem * describing any failure
back up the call stack.   

Member Typedef Documentation

◆ wrapped_t

typedef bool opt_wrapper< bool >::wrapped_t
inherited

Constructor & Destructor Documentation

◆ opt_result() [1/2]

return opt_result::opt_result ( false ,
problem  )

Referenced by propagate_failure(), and success().

◆ opt_result() [2/2]

opt_result::opt_result ( wrapped_t result,
opt_problem * problem )
inlineprivate

Member Function Documentation

◆ failure_at()

◆ get_problem()

opt_problem * opt_wrapper< bool >::get_problem ( ) const
inlineinherited

◆ get_result()

wrapped_t opt_wrapper< bool >::get_result ( ) const
inlineinherited

◆ if()

static opt_result opt_result::if ( dump_enabled_p() )
inline

References ap, and ggc_alloc().

◆ operator wrapped_t()

opt_wrapper< bool >::operator wrapped_t ( ) const
inlineinherited

◆ propagate_failure()

template<typename S >
static opt_result opt_result::propagate_failure ( opt_wrapper< S > other)
inlinestatic

◆ success()

Field Documentation

◆ m_result

wrapped_t opt_wrapper< bool >::m_result
privateinherited

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