MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
Classes
Maybe

Maybe encapsulates an optional value. More...

Classes

struct  boost::mpl11::just< x >
 Creates an optional value containing x. More...
 
struct  boost::mpl11::nothing
 Creates an empty optional value. More...
 
struct  boost::mpl11::maybe< def, f, m >
 Applies a metafunction class to a Maybe, with a fallback result. More...
 
struct  boost::mpl11::is_just< m >
 Returns whether a Maybe is a just. More...
 
struct  boost::mpl11::is_nothing< m >
 Returns whether a Maybe is a nothing. More...
 
struct  boost::mpl11::from_maybe< def, m >
 If m is nothing, returns def. More...
 
struct  boost::mpl11::from_just< m >
 Extracts the value out of a just, and triggers a hard compile-time error if the argument is nothing. More...
 

Detailed Description

Maybe encapsulates an optional value.

A Maybe either contains a value (represented as just<x>), or it is empty (represented as nothing).

Instance of

Functor

Todo:
  • Instantiate Comparable and Orderable forĀ Maybe. This might require Maybe to become a parametric datatype. Can we handle this?