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

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:

  // public member functions
  optional_manipulator(stored_optional_type, stored_none_type) noexcept;
  template<typename StreamT> void output(StreamT &) const;
};

Description

Stream manipulator for inserting an optional value.

optional_manipulator public member functions

  1. optional_manipulator(stored_optional_type opt, stored_none_type none) noexcept;
    Initializing constructor.
  2. template<typename StreamT> void output(StreamT & stream) const;
    The method outputs the value, if it is present, otherwise outputs the "none" marker.

PrevUpHomeNext