mirror of
https://github.com/nlohmann/json.git
synced 2026-10-07 00:11:05 +07:00
Rename with_changed_*_t aliases to with_*_t and merge integer/unsigned aliases
Per review discussion on #3898 between gregmarr and nlohmann: - rename with_changed_X_t to with_X_t for brevity - replace the separate with_changed_integer_t/with_changed_unsigned_t aliases with a single with_integers_t<NumberIntegerType2, NumberUnsignedType2> - add @sa doc comment links for the upcoming documentation page Co-authored-by: Raphael Grimm <1005058+barcode@users.noreply.github.com> Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
co-authored by
Raphael Grimm
parent
c7a0d59e16
commit
97f724951b
@@ -48,7 +48,7 @@ TEST_CASE("bad_alloc")
|
||||
SECTION("bad_alloc")
|
||||
{
|
||||
// create JSON type using the throwing allocator
|
||||
using bad_json = nlohmann::json::with_changed_allocator_t<bad_allocator>;
|
||||
using bad_json = nlohmann::json::with_allocator_t<bad_allocator>;
|
||||
|
||||
// creating an object should throw
|
||||
CHECK_THROWS_AS(bad_json(bad_json::value_t::object), std::bad_alloc&);
|
||||
@@ -122,7 +122,7 @@ void my_allocator_clean_up(T* p)
|
||||
TEST_CASE("controlled bad_alloc")
|
||||
{
|
||||
// create JSON type using the throwing allocator
|
||||
using my_json = nlohmann::json::with_changed_allocator_t<my_allocator>;
|
||||
using my_json = nlohmann::json::with_allocator_t<my_allocator>;
|
||||
|
||||
SECTION("class json_value")
|
||||
{
|
||||
@@ -574,7 +574,7 @@ TEST_CASE("bad my_allocator::construct")
|
||||
{
|
||||
SECTION("my_allocator::construct doesn't forward")
|
||||
{
|
||||
using bad_alloc_json = nlohmann::json::with_changed_allocator_t<allocator_no_forward>;
|
||||
using bad_alloc_json = nlohmann::json::with_allocator_t<allocator_no_forward>;
|
||||
|
||||
bad_alloc_json j;
|
||||
j["test"] = bad_alloc_json::array_t();
|
||||
|
||||
Reference in New Issue
Block a user