2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-30 20:12:23 +00:00

typedef -> using

This commit is contained in:
Zach Laine
2017-04-30 21:23:42 -05:00
parent 9abcb3dd0f
commit 8317aeb942
3 changed files with 9 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ namespace yaml { namespace ast {
{
struct depth_f
{
typedef int result_type;
using result_type = int;
template <typename T>
int operator()(T const& val) const
@@ -91,7 +91,7 @@ namespace yaml { namespace ast {
template <int Spaces, bool ExpandAliases>
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<std::string::const_iterator> iter_t;
using ucs4_char = ::boost::uint32_t;
using iter_t = boost::u8_to_u32_iterator<std::string::const_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 <typename A, typename B>
bool operator()(A const& a, B const& b) const

View File

@@ -22,7 +22,7 @@ namespace yaml { namespace parser {
struct check_yaml_version
{
template <typename, typename>
struct result { typedef void type; };
struct result { using type = void; };
void operator() (unsigned int major, unsigned int minor) const
{

View File

@@ -24,11 +24,11 @@ namespace yaml { namespace parser {
struct push_utf8
{
template <typename S, typename C>
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<std::string> insert_iter;
using insert_iter = std::back_insert_iterator<std::string>;
insert_iter out_iter(utf8);
boost::utf8_output_iterator<insert_iter> utf8_iter(out_iter);
*utf8_iter++ = code_point;
@@ -38,7 +38,7 @@ namespace yaml { namespace parser {
struct push_esc
{
template <typename S, typename C>
struct result { typedef void type; };
struct result { using type = void; };
void operator() (std::string & utf8, uchar_t c) const
{