diff --git a/include/toml11/parser.hpp b/include/toml11/parser.hpp index 5952f99..37e4d32 100644 --- a/include/toml11/parser.hpp +++ b/include/toml11/parser.hpp @@ -1693,21 +1693,7 @@ parse_simple_key(location& loc, const context& ctx) if(const auto bare = syntax::unquoted_key(spec).scan(loc)) { - const auto reg = bare.as_string(); - // here we cannot use `if constexpr` because it is C++11. - if(std::is_same::value) - { - return ok(reg); - } - else - { - key_type k; - for(const auto c : reg) - { - k += typename key_type::value_type(c); - } - return ok(k); - } + return ok(to_string_of(bare.as_string())); } else {