mirror of
https://github.com/boostorg/io.git
synced 2025-06-25 03:51:36 +02:00
Take all primitive aspect_type by value
This commit is contained in:
@ -7,8 +7,8 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#ifndef BOOST_IO_IOS_STATE_HPP
|
||||
#define BOOST_IO_IOS_STATE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/io_fwd.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <ios>
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
#include <locale>
|
||||
@ -29,7 +29,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.flags()) { }
|
||||
|
||||
ios_flags_saver(state_type& s, const aspect_type& a)
|
||||
ios_flags_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.flags(a)) { }
|
||||
|
||||
@ -58,7 +58,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.precision()) { }
|
||||
|
||||
ios_precision_saver(state_type& s, const aspect_type& a)
|
||||
ios_precision_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.precision(a)) { }
|
||||
|
||||
@ -87,7 +87,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.width()) { }
|
||||
|
||||
ios_width_saver(state_type& s, const aspect_type& a)
|
||||
ios_width_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.width(a)) { }
|
||||
|
||||
@ -117,7 +117,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdstate()) { }
|
||||
|
||||
basic_ios_iostate_saver(state_type& s, const aspect_type& a)
|
||||
basic_ios_iostate_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdstate()) {
|
||||
s.clear(a);
|
||||
@ -149,11 +149,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.exceptions()) { }
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
basic_ios_exception_saver(state_type& s, aspect_type a)
|
||||
#else
|
||||
basic_ios_exception_saver(state_type& s, const aspect_type& a)
|
||||
#endif
|
||||
: s_save_(s)
|
||||
, a_save_(s.exceptions()) {
|
||||
s.exceptions(a);
|
||||
@ -185,7 +181,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.tie()) { }
|
||||
|
||||
basic_ios_tie_saver(state_type& s, const aspect_type& a)
|
||||
basic_ios_tie_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.tie(a)) { }
|
||||
|
||||
@ -215,7 +211,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdbuf()) { }
|
||||
|
||||
basic_ios_rdbuf_saver(state_type& s, const aspect_type& a)
|
||||
basic_ios_rdbuf_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdbuf(a)) { }
|
||||
|
||||
@ -245,7 +241,7 @@ public:
|
||||
: s_save_(s)
|
||||
, a_save_(s.fill()) { }
|
||||
|
||||
basic_ios_fill_saver(state_type& s, const aspect_type& a)
|
||||
basic_ios_fill_saver(state_type& s, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.fill(a)) { }
|
||||
|
||||
@ -308,7 +304,7 @@ public:
|
||||
, a_save_(s.iword(i))
|
||||
, i_save_(i) { }
|
||||
|
||||
ios_iword_saver(state_type& s, index_type i, const aspect_type& a)
|
||||
ios_iword_saver(state_type& s, index_type i, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.iword(i))
|
||||
, i_save_(i) {
|
||||
@ -343,7 +339,7 @@ public:
|
||||
, a_save_(s.pword(i))
|
||||
, i_save_(i) { }
|
||||
|
||||
ios_pword_saver(state_type& s, index_type i, const aspect_type& a)
|
||||
ios_pword_saver(state_type& s, index_type i, aspect_type a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.pword(i))
|
||||
, i_save_(i) {
|
||||
|
Reference in New Issue
Block a user