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

Class template optional_manipulator

boost::log::optional_manipulator

Synopsis

// In header: <boost/log/utility/manipulators/optional.hpp>

template<typename OptionalT, typename NoneT> 
class optional_manipulator {
public:
  // construct/copy/destruct
  optional_manipulator(stored_optional_type, stored_none_type) noexcept;

  // public member functions
  template<typename StreamT> void output(StreamT &) const;
};

Description

Stream manipulator for inserting an optional value.

optional_manipulator public construct/copy/destruct

  1. optional_manipulator(stored_optional_type opt, stored_none_type none) noexcept;
    Initializing constructor.

optional_manipulator public member functions

  1. template<typename StreamT> void output(StreamT & stream) const;
    The method outputs the value, if it is present, otherwise outputs the "none" marker.

PrevUpHomeNext