Lines Matching refs:std
19 struct bad_allocator : std::allocator<T>
21 using std::allocator<T>::allocator;
26 throw std::bad_alloc();
36 using bad_json = nlohmann::basic_json<std::map,
37 std::vector,
38 std::string,
40 std::int64_t,
41 std::uint64_t,
46 CHECK_THROWS_AS(bad_json(bad_json::value_t::object), std::bad_alloc&);
57 struct my_allocator : std::allocator<T>
59 using std::allocator<T>::allocator;
67 throw std::bad_alloc();
70 ::new (reinterpret_cast<void*>(p)) T(std::forward<Args>(args)...);
73 void deallocate(T* p, std::size_t n)
78 throw std::bad_alloc();
81 std::allocator<T>::deallocate(p, n);
89 throw std::bad_alloc();
117 using my_json = nlohmann::basic_json<std::map,
118 std::vector,
119 std::string,
121 std::int64_t,
122 std::uint64_t,
136 CHECK_THROWS_AS(my_json::json_value(t), std::bad_alloc&);
145 CHECK_THROWS_AS(my_json::json_value(t), std::bad_alloc&);
154 CHECK_THROWS_AS(my_json::json_value(t), std::bad_alloc&);
165 CHECK_THROWS_AS(my_json::json_value(v), std::bad_alloc&);
175 std::map<std::string, std::string> v {{"foo", "bar"}};
178 CHECK_THROWS_AS(my_json(v), std::bad_alloc&);
185 std::vector<std::string> v {"foo", "bar", "baz"};
188 CHECK_THROWS_AS(my_json(v), std::bad_alloc&);
197 CHECK_THROWS_AS(my_json("foo"), std::bad_alloc&);
204 std::string s("foo");
207 CHECK_THROWS_AS(my_json(s), std::bad_alloc&);
216 struct allocator_no_forward : std::allocator<T>
241 using bad_alloc_json = nlohmann::basic_json<std::map,
242 std::vector,
243 std::string,
245 std::int64_t,
246 std::uint64_t,