From 6fbe924602377e3cdc7ed3bc873b4b072af39c2e Mon Sep 17 00:00:00 2001 From: Jamie Seward Date: Tue, 24 Oct 2017 23:38:14 -0700 Subject: [PATCH] Remove std::make_unique Forgot not available for C++11 --- src/json.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 2c9c2c00e..6989f0c96 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -3334,7 +3334,7 @@ class parser // throw in case of infinity or NAN if (JSON_UNLIKELY(not std::isfinite(result.m_value.number_float))) { - ex = std::make_unique(406, "number overflow parsing '" + m_lexer.get_token_string() + "'"); + ex = std::unique_ptr(new out_of_range(406, "number overflow parsing '" + m_lexer.get_token_string() + "'")); errored = true; return; } @@ -3521,7 +3521,7 @@ class parser error_msg += "; expected " + std::string(lexer_t::token_type_name(expected)); } - return std::make_unique(101, m_lexer.get_position(), error_msg); + return std::unique_ptr(new parse_error(101, m_lexer.get_position(), error_msg)); } private: