Re: [Boost-bugs] [Boost C++ Libraries] #10992: Chrono IO state savers inconsistent with Boost.IO state savers

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10992: Chrono IO state savers inconsistent with Boost.IO state savers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-16 15:10:39


#10992: Chrono IO state savers inconsistent with Boost.IO state savers
--------------------------------------+---------------------
  Reporter: rkawulak | Owner: viboes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: chrono
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+---------------------

Comment (by viboes):

 Please, could you be more explicit?

 Are you referring to


 {{{
     struct duration_style_io_saver
     {

       //! the type of the state to restore
       typedef std::ios_base state_type;
       //! the type of aspect to save
       typedef duration_style aspect_type;

       /**
        * Explicit construction from an i/o stream.
        *
        * Store a reference to the i/o stream and the value of the
 associated @c duration_style.
        */
       explicit duration_style_io_saver(state_type &s) :
         s_save_(s)
       {
         a_save_ = get_duration_style(s_save_);
       }

       /**
        * Construction from an i/o stream and a @c duration_style to
 restore.
        *
        * Stores a reference to the i/o stream and the value @c
 duration_style to restore given as parameter.
        */
       duration_style_io_saver(state_type &s, aspect_type new_value) :
         s_save_(s), a_save_(new_value)
       {
       }

       /**
        * Destructor.
        *
        * Restores the i/o stream with the duration_style to be restored.
        */
       ~duration_style_io_saver()
       {
         this->restore();
       }

       /**
        * Restores the i/o stream with the duration_style to be restored.
        */
       void restore()
       {
         set_duration_style(s_save_, a_save_);
       }

     private:
       duration_style_io_saver& operator=(duration_style_io_saver const&
 rhs) ;

       state_type& s_save_;
       aspect_type a_save_;
     };

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10992#comment:1>
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:17 UTC