From 8317aeb9426fd2f0ec986c224dd02412f4ae0c38 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sun, 30 Apr 2017 21:23:42 -0500 Subject: [PATCH] typedef -> using --- yaml/detail/ast_impl.hpp | 10 +++++----- yaml/parser/basic_structures_def.hpp | 2 +- yaml/parser/characters_def.hpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/yaml/detail/ast_impl.hpp b/yaml/detail/ast_impl.hpp index 05d94343..fc307b53 100644 --- a/yaml/detail/ast_impl.hpp +++ b/yaml/detail/ast_impl.hpp @@ -26,7 +26,7 @@ namespace yaml { namespace ast { { struct depth_f { - typedef int result_type; + using result_type = int; template int operator()(T const& val) const @@ -91,7 +91,7 @@ namespace yaml { namespace ast { template struct yaml_printer { - typedef void result_type; + using result_type = void; static int const spaces = Spaces; static int const primary_level = 0; static bool const expand_aliases = ExpandAliases; @@ -122,8 +122,8 @@ namespace yaml { namespace ast { if (!is_key) out << '"'; - typedef ::boost::uint32_t ucs4_char; - typedef boost::u8_to_u32_iterator iter_t; + using ucs4_char = ::boost::uint32_t; + using iter_t = boost::u8_to_u32_iterator; iter_t f = utf.begin(); iter_t l = utf.end(); @@ -339,7 +339,7 @@ namespace yaml { namespace ast { struct value_equal { - typedef bool result_type; + using result_type = bool; template bool operator()(A const& a, B const& b) const diff --git a/yaml/parser/basic_structures_def.hpp b/yaml/parser/basic_structures_def.hpp index 7fbb6e86..163205f4 100644 --- a/yaml/parser/basic_structures_def.hpp +++ b/yaml/parser/basic_structures_def.hpp @@ -22,7 +22,7 @@ namespace yaml { namespace parser { struct check_yaml_version { template - struct result { typedef void type; }; + struct result { using type = void; }; void operator() (unsigned int major, unsigned int minor) const { diff --git a/yaml/parser/characters_def.hpp b/yaml/parser/characters_def.hpp index fcfd313c..77e1d795 100644 --- a/yaml/parser/characters_def.hpp +++ b/yaml/parser/characters_def.hpp @@ -24,11 +24,11 @@ namespace yaml { namespace parser { struct push_utf8 { template - struct result { typedef void type; }; + struct result { using type = void; }; void operator() (std::string & utf8, uchar_t code_point) const { - typedef std::back_insert_iterator insert_iter; + using insert_iter = std::back_insert_iterator; insert_iter out_iter(utf8); boost::utf8_output_iterator utf8_iter(out_iter); *utf8_iter++ = code_point; @@ -38,7 +38,7 @@ namespace yaml { namespace parser { struct push_esc { template - struct result { typedef void type; }; + struct result { using type = void; }; void operator() (std::string & utf8, uchar_t c) const {