diff --git a/include/boost/format/alt_sstream.hpp b/include/boost/format/alt_sstream.hpp index 3a0a07a..9f8705f 100644 --- a/include/boost/format/alt_sstream.hpp +++ b/include/boost/format/alt_sstream.hpp @@ -39,20 +39,20 @@ namespace boost { class basic_altstringbuf : public ::std::basic_streambuf { - typedef ::std::basic_streambuf streambuf_t; - typedef typename CompatAlloc::compatible_type compat_allocator_type; - typedef typename CompatTraits::compatible_type compat_traits_type; + using streambuf_t = ::std::basic_streambuf; + using compat_allocator_type = typename CompatAlloc::compatible_type; + using compat_traits_type = typename CompatTraits::compatible_type; public: - typedef Ch char_type; - typedef Tr traits_type; - typedef typename compat_traits_type::int_type int_type; - typedef typename compat_traits_type::pos_type pos_type; - typedef typename compat_traits_type::off_type off_type; - typedef Alloc allocator_type; - typedef ::std::basic_string string_type; - typedef typename string_type::size_type size_type; + using char_type = Ch; + using traits_type = Tr; + using int_type = typename compat_traits_type::int_type; + using pos_type = typename compat_traits_type::pos_type; + using off_type = typename compat_traits_type::off_type; + using allocator_type = Alloc; + using string_type = ::std::basic_string; + using size_type = typename string_type::size_type; - typedef ::std::streamsize streamsize; + using streamsize = ::std::streamsize; explicit basic_altstringbuf(std::ios_base::openmode mode @@ -129,13 +129,12 @@ namespace boost { template const T & operator()(const T & arg) { return arg; } }; - typedef ::std::basic_ostream stream_t; - typedef boost::base_from_member > > - pbase_type; - typedef ::std::basic_string string_type; - typedef typename string_type::size_type size_type; - typedef basic_altstringbuf stringbuf_t; + using stream_t = ::std::basic_ostream; + using pbase_type = boost::base_from_member > >; + using string_type = ::std::basic_string; + using size_type = typename string_type::size_type; + using stringbuf_t = basic_altstringbuf; public: typedef Alloc allocator_type; basic_oaltstringstream() diff --git a/include/boost/format/detail/compat_workarounds.hpp b/include/boost/format/detail/compat_workarounds.hpp index 8e51514..d52cc81 100644 --- a/include/boost/format/detail/compat_workarounds.hpp +++ b/include/boost/format/detail/compat_workarounds.hpp @@ -70,7 +70,7 @@ namespace boost { class CompatTraits { // general case : be transparent public: - typedef Tr compatible_type; + using compatible_type = Tr; }; // **** CompatAlloc general definitions : ----------------------------- @@ -78,7 +78,7 @@ namespace boost { class CompatAlloc { // general case : be transparent public: - typedef Alloc compatible_type; + using compatible_type = Alloc; }; } //N.S. io diff --git a/include/boost/format/detail/config_macros.hpp b/include/boost/format/detail/config_macros.hpp index 9bd9e6b..83331de 100644 --- a/include/boost/format/detail/config_macros.hpp +++ b/include/boost/format/detail/config_macros.hpp @@ -83,9 +83,9 @@ namespace boost { // this typedef is either std::locale or int, avoids placing ifdefs everywhere namespace boost { namespace io { namespace detail { #if ! defined(BOOST_NO_STD_LOCALE) - typedef BOOST_IO_STD locale locale_t; + using locale_t = BOOST_IO_STD locale; #else - typedef int locale_t; + using locale_t = int; #endif } } } diff --git a/include/boost/format/detail/workarounds_gcc-2_95.hpp b/include/boost/format/detail/workarounds_gcc-2_95.hpp index 8c49d42..98ad65a 100644 --- a/include/boost/format/detail/workarounds_gcc-2_95.hpp +++ b/include/boost/format/detail/workarounds_gcc-2_95.hpp @@ -85,7 +85,7 @@ namespace std { }; - typedef ios ios_base; + using ios_base = ios; template class basic_ostream; @@ -110,12 +110,12 @@ namespace boost { : public ::std::string_char_traits { public: - typedef CompatTraits compatible_type; + using compatible_type = CompatTraits; - typedef Ch char_type; - typedef int int_type; - typedef ::std::streampos pos_type; - typedef ::std::streamoff off_type; + using char_type = Ch; + using int_type = int; + using pos_type = ::std::streampos; + using off_type = ::std::streamoff; static char_type to_char_type(const int_type& meta) { @@ -139,7 +139,7 @@ namespace boost { template class CompatTraits< ::std::char_traits > { public: - typedef CompatTraits< ::std::string_char_traits > compatible_type; + using compatible_type = CompatTraits< ::std::string_char_traits >; }; // ** CompatAlloc gcc-2.95 specialisations --------------------------- @@ -147,7 +147,7 @@ namespace boost { class CompatAlloc< ::std::alloc> { public: - typedef ::std::allocator compatible_type; + using compatible_type = ::std::allocator; }; } // N.S. io diff --git a/include/boost/format/feed_args.hpp b/include/boost/format/feed_args.hpp index b0e520e..e0cbdec 100644 --- a/include/boost/format/feed_args.hpp +++ b/include/boost/format/feed_args.hpp @@ -167,9 +167,9 @@ namespace detail { // does the actual conversion of x, with given params, into a string // using the supplied stringbuf. - typedef typename basic_format::string_type string_type; - typedef typename basic_format::format_item_t format_item_t; - typedef typename string_type::size_type size_type; + using string_type = typename basic_format::string_type; + using format_item_t = typename basic_format::format_item_t; + using size_type = typename string_type::size_type; basic_oaltstringstream oss( &buf); diff --git a/include/boost/format/format_class.hpp b/include/boost/format/format_class.hpp index a7ccc29..9077c0f 100644 --- a/include/boost/format/format_class.hpp +++ b/include/boost/format/format_class.hpp @@ -31,11 +31,11 @@ namespace boost { { typedef typename io::CompatTraits::compatible_type compat_traits; public: - typedef Ch CharT; // borland fails in operator% if we use Ch and Tr directly - typedef std::basic_string string_type; - typedef typename string_type::size_type size_type; - typedef io::detail::format_item format_item_t; - typedef io::basic_altstringbuf internal_streambuf_t; + using CharT = Ch; // borland fails in operator% if we use Ch and Tr directly + using string_type = std::basic_string ; + using size_type = typename string_type::size_type ; + using format_item_t = io::detail::format_item ; + using internal_streambuf_t = io::basic_altstringbuf ; explicit basic_format(const Ch* str=NULL); @@ -153,7 +153,7 @@ namespace boost { private: #endif - typedef io::detail::stream_format_state stream_format_state; + using stream_format_state = io::detail::stream_format_state; // flag bits, used for style_ enum style_values { ordered = 1, // set only if all directives are positional special_needs = 4 }; diff --git a/include/boost/format/format_fwd.hpp b/include/boost/format/format_fwd.hpp index 16b8565..70da725 100644 --- a/include/boost/format/format_fwd.hpp +++ b/include/boost/format/format_fwd.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include namespace boost { @@ -24,10 +24,10 @@ namespace boost { class Tr = BOOST_IO_STD char_traits, class Alloc = std::allocator > class basic_format; - typedef basic_format format; + using format = basic_format ; #if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) - typedef basic_format wformat; + using wformat = basic_format; #endif namespace io { diff --git a/include/boost/format/free_funcs.hpp b/include/boost/format/free_funcs.hpp index 3a51545..e369bad 100644 --- a/include/boost/format/free_funcs.hpp +++ b/include/boost/format/free_funcs.hpp @@ -40,7 +40,7 @@ namespace boost { #endif // effect: "return os << str(f);" but we can do it faster { - typedef boost::basic_format format_t; + using format_t = boost::basic_format; if(f.items_.size()==0) os << f.prefix_; else { diff --git a/include/boost/format/internals.hpp b/include/boost/format/internals.hpp index cd5fc54..aea33c8 100644 --- a/include/boost/format/internals.hpp +++ b/include/boost/format/internals.hpp @@ -34,7 +34,7 @@ namespace detail { template struct stream_format_state { - typedef BOOST_IO_STD basic_ios basic_ios; + using basic_ios = BOOST_IO_STD basic_ios; stream_format_state(Ch fill) { reset(fill); } // stream_format_state(const basic_ios& os) { set_by_stream(os); } @@ -72,9 +72,9 @@ namespace detail { argN_tabulation = -2, // tabulation directive. (no argument read) argN_ignored = -3 // ignored directive. (no argument read) }; - typedef BOOST_IO_STD basic_ios basic_ios; - typedef detail::stream_format_state stream_format_state; - typedef ::std::basic_string string_type; + using basic_ios = BOOST_IO_STD basic_ios; + using stream_format_state = detail::stream_format_state; + using string_type = ::std::basic_string; format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill), truncate_(max_streamsize()), pad_scheme_(0) {} diff --git a/include/boost/format/parsing.hpp b/include/boost/format/parsing.hpp index 0007492..78a45e8 100644 --- a/include/boost/format/parsing.hpp +++ b/include/boost/format/parsing.hpp @@ -109,7 +109,7 @@ namespace detail { const Facet& fac, std::size_t offset, unsigned char exceptions) { - typedef typename basic_format::format_item_t format_item_t; + using format_item_t = typename basic_format::format_item_t; fpar->argN_ = format_item_t::argN_no_posit; // if no positional-directive bool precision_set = false;