From d745113a1503e86ca2801e68d48c61fc1bb3d0c0 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 25 Aug 2004 21:57:44 +0100 Subject: [PATCH] enc_filebuf.h: Move concept-check macro to class scope. 2004-08-25 Jonathan Wakely * include/ext/enc_filebuf.h: Move concept-check macro to class scope. From-SVN: r86579 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/ext/enc_filebuf.h | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3c6abcc7c282..8ca114642c7a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2004-08-25 Jonathan Wakely + + * include/ext/enc_filebuf.h: Move concept-check macro to class scope. + 2004-07-27 Benjamin Kosnik * config/linker-map.gnu: Export typeinfo information. diff --git a/libstdc++-v3/include/ext/enc_filebuf.h b/libstdc++-v3/include/ext/enc_filebuf.h index e1152bd26f9f..4b1a7dfebe91 100644 --- a/libstdc++-v3/include/ext/enc_filebuf.h +++ b/libstdc++-v3/include/ext/enc_filebuf.h @@ -49,13 +49,16 @@ namespace __gnu_cxx enc_filebuf(state_type& __state) : std::basic_filebuf<_CharT, enc_char_traits<_CharT> >() - { - // Set state type to something useful. - // Something more than copyconstructible is needed here, so - // require copyconstructible + assignment operator. - __glibcpp_class_requires(state_type, _SGIAssignableConcept); - _M_state_cur = __state; - _M_state_cur._M_init(); - }; + { + this->_M_state_beg = __state; + this->_M_state_beg._M_init(); + } + + private: + // concept requirements: + // Set state type to something useful. + // Something more than copyconstructible is needed here, so + // require default and copy constructible + assignment operator. + __glibcxx_class_requires(state_type, _SGIAssignableConcept) }; } // namespace __gnu_cxx -- 2.47.2