include memory
This commit is contained in:
parent
df0fc3e046
commit
519f972fc4
@ -20,6 +20,7 @@
|
||||
#include <string> // char_traits, string
|
||||
#include <utility> // make_pair, move
|
||||
#include <vector> // vector
|
||||
#include <memory>
|
||||
|
||||
#include <nlohmann/detail/exceptions.hpp>
|
||||
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <string> // string
|
||||
#include <utility> // move
|
||||
#include <vector> // vector
|
||||
#include <memory>
|
||||
|
||||
#include <nlohmann/detail/exceptions.hpp>
|
||||
#include <nlohmann/detail/macro_scope.hpp>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include <string> // char_traits, string
|
||||
#include <utility> // move
|
||||
#include <vector> // vector
|
||||
#include <memory>
|
||||
|
||||
#include <nlohmann/detail/input/input_adapters.hpp>
|
||||
#include <nlohmann/detail/input/position_t.hpp>
|
||||
|
||||
@ -288,7 +288,7 @@ struct NAlloc
|
||||
|
||||
}
|
||||
|
||||
virtual ~NAlloc() { }
|
||||
virtual ~NAlloc() = default;
|
||||
|
||||
pointer allocate(std::size_t n)
|
||||
{
|
||||
@ -312,16 +312,16 @@ struct NAlloc
|
||||
}
|
||||
|
||||
my_allocator<char> alloc;
|
||||
std::size_t m_alloc_size;
|
||||
std::size_t m_alloc_size {};
|
||||
};
|
||||
|
||||
|
||||
using OstringStream = std::basic_ostringstream<char, std::char_traits<char>, NAlloc<char>>;
|
||||
using IstringStream = std::basic_istringstream<char, std::char_traits<char>, NAlloc<char>>;
|
||||
typedef std::basic_string<char, std::char_traits<char>, NAlloc<char>> RtString;
|
||||
using RtString = std::basic_string<char, std::char_traits<char>, NAlloc<char>>;
|
||||
|
||||
|
||||
}
|
||||
} //namespace
|
||||
|
||||
TEST_CASE("controlled bad_alloc_rt_string")
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user