Re: [Boost-bugs] [Boost C++ Libraries] #7495: Support for boost::optional in boost::program_options

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7495: Support for boost::optional in boost::program_options
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-19 02:44:27


#7495: Support for boost::optional in boost::program_options
------------------------------------------+-----------------------------
  Reporter: Dmitry Trifonov <user61a@…> | Owner: vladimir_prus
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: program_options
   Version: Boost 1.52.0 | Severity: Optimization
Resolution: | Keywords:
------------------------------------------+-----------------------------

Comment (by fakong@…):

 you only need to include this piece of code

 template<class T>
 std::istream& operator>>(std::istream& in, boost::optional<T>& obj)
 {
     T value;
     in >> value;
     obj = value;
     return in;
 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7495#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC