From 65540fbb5cb76bfce4824f76cec3312ba03e85a5 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sat, 1 Jun 2019 19:47:10 +0900 Subject: [PATCH] fix: typos --- toml/types.hpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/toml/types.hpp b/toml/types.hpp index 2c0d9d8..31e7717 100644 --- a/toml/types.hpp +++ b/toml/types.hpp @@ -6,13 +6,15 @@ #include "string.hpp" #include "traits.hpp" #include "comments.hpp" +#include +#include namespace toml { template Table, // map-like class - template Array> // vector-like class + template class Table, // map-like class + template class Array> // vector-like class class basic_value; using character = char; @@ -30,7 +32,7 @@ using floating = double; // "float" is a keyward, cannot use it here. // - local_time // default toml::value and default array/table -using value = basic_value; +using value = basic_value; enum class value_t : std::uint8_t { @@ -102,7 +104,7 @@ template struct enum_to_type{us // meta-function that converts from an exact toml type to the enum that corresponds to. template -struct type_to_enum : typename std::conditional< +struct type_to_enum : std::conditional< std::is_same::value, // if T == array_type, value_t_constant, // then value_t::array typename std::conditional< // else... @@ -110,7 +112,7 @@ struct type_to_enum : typename std::conditional< value_t_constant, // then value_t::table value_t_constant // else value_t::empty >::type - >::type {} + >::type {}; template struct type_to_enum: value_t_constant {}; template struct type_to_enum: value_t_constant {}; template struct type_to_enum: value_t_constant {}; @@ -152,15 +154,15 @@ struct is_convertible_to_toml_value : disjunction< std::is_same, // T is local_time or std::is_same, // T is local_datetime or std::is_same, // T is offset_datetime or - std::is_same // T is time_point or + std::is_same, // T is time_point or is_chrono_duration, // T is a duration or std::is_same, // T is an array type or - std::is_same, // T is an array type or - >{} + std::is_same // T is an array type or + >{}; // meta-function that returns value_t that represent the convertible type template -struct convertible_toml_type_of : typename std::conditional< +struct convertible_toml_type_of : std::conditional< /* if */ is_exact_toml_type::value, /* then */ value_t_constant::value>, /* else */ typename std::conditional< @@ -173,24 +175,23 @@ struct convertible_toml_type_of : typename std::conditional< /* then */ value_t_constant, /* else */ typename std::conditional< // ---------------------------------------------------------------------- - /* if */ std::is_same::value, + /* if */ std::is_same::value, /* then */ value_t_constant, /* else */ typename std::conditional< // ---------------------------------------------------------------------- - /* if */ is_string_literal, + /* if */ is_string_literal::value, /* then */ value_t_constant, /* else */ typename std::conditional< // ---------------------------------------------------------------------- - /* if */ is_chrono_duration, + /* if */ is_chrono_duration::value, /* then */ value_t_constant, /* else */ typename std::conditional< // ---------------------------------------------------------------------- - /* if */ std::is_same, + /* if */ std::is_same::value, /* then */ value_t_constant, - /* else */ value_t_constant, + /* else */ value_t_constant // ---------------------------------------------------------------------- - >::type>::type>::type>::type>::type>::type>::type - >{} + >::type>::type>::type>::type>::type>::type>::type {}; } // detail } // toml