Skip to content

Commit 92f2969

Browse files
re-amalgamate with astyle 3.1
1 parent e970507 commit 92f2969

20 files changed

+266
-266
lines changed

docs/examples/json_base_class_t.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ int main()
7979

8080
// visit and output
8181
j.visit(
82-
[&](const json::json_pointer & p,
83-
const json & j)
82+
[&](const json::json_pointer & p,
83+
const json & j)
8484
{
8585
std::cout << (p.empty() ? std::string{"/"} : p.to_string())
8686
<< " - metadata = " << j.metadata << " -> " << j.dump() << '\n';

include/nlohmann/detail/abi_macros.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353

5454
#define NLOHMANN_JSON_ABI_TAGS \
5555
NLOHMANN_JSON_ABI_TAGS_CONCAT( \
56-
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
57-
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
56+
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
57+
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
5858

5959
// Construct the namespace version component
6060
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
@@ -79,17 +79,17 @@
7979
#ifndef NLOHMANN_JSON_NAMESPACE
8080
#define NLOHMANN_JSON_NAMESPACE \
8181
nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
82-
NLOHMANN_JSON_ABI_TAGS, \
83-
NLOHMANN_JSON_NAMESPACE_VERSION)
82+
NLOHMANN_JSON_ABI_TAGS, \
83+
NLOHMANN_JSON_NAMESPACE_VERSION)
8484
#endif
8585

8686
#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
8787
#define NLOHMANN_JSON_NAMESPACE_BEGIN \
8888
namespace nlohmann \
8989
{ \
9090
inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
91-
NLOHMANN_JSON_ABI_TAGS, \
92-
NLOHMANN_JSON_NAMESPACE_VERSION) \
91+
NLOHMANN_JSON_ABI_TAGS, \
92+
NLOHMANN_JSON_NAMESPACE_VERSION) \
9393
{
9494
#endif
9595

include/nlohmann/detail/conversions/from_json.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ template < typename BasicJsonType, typename ConstructibleArrayType,
263263
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)
264264
-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),
265265
j.template get<typename ConstructibleArrayType::value_type>(),
266-
void())
266+
void())
267267
{
268268
if (JSON_HEDLEY_UNLIKELY(!j.is_array()))
269269
{
@@ -275,7 +275,7 @@ j.template get<typename ConstructibleArrayType::value_type>(),
275275

276276
template < typename BasicJsonType, typename T, std::size_t... Idx >
277277
std::array<T, sizeof...(Idx)> from_json_inplace_array_impl(BasicJsonType&& j,
278-
identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/)
278+
identity_tag<std::array<T, sizeof...(Idx)>> /*unused*/, index_sequence<Idx...> /*unused*/)
279279
{
280280
return { { std::forward<BasicJsonType>(j).at(Idx).template get<T>()... } };
281281
}

include/nlohmann/detail/input/binary_reader.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ class binary_reader
525525
{
526526
std::uint64_t number{};
527527
return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1)
528-
- static_cast<number_integer_t>(number));
528+
- static_cast<number_integer_t>(number));
529529
}
530530

531531
// Binary data (0x00..0x17 bytes follow)

include/nlohmann/detail/input/parser.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class parser
348348
return sax->parse_error(m_lexer.get_position(),
349349
m_lexer.get_token_string(),
350350
parse_error::create(101, m_lexer.get_position(),
351-
"attempting to parse an empty input; check that your input string or stream contains the expected JSON", nullptr));
351+
"attempting to parse an empty input; check that your input string or stream contains the expected JSON", nullptr));
352352
}
353353

354354
return sax->parse_error(m_lexer.get_position(),

include/nlohmann/detail/iterators/iteration_proxy.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ namespace std
220220
#endif
221221
template<typename IteratorType>
222222
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> // NOLINT(cert-dcl58-cpp)
223-
: public std::integral_constant<std::size_t, 2> {};
223+
: public std::integral_constant<std::size_t, 2> {};
224224

225225
template<std::size_t N, typename IteratorType>
226226
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> // NOLINT(cert-dcl58-cpp)

include/nlohmann/detail/iterators/iterator_traits.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct iterator_traits
4343

4444
template<typename T>
4545
struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >>
46-
: iterator_types<T>
46+
: iterator_types<T>
4747
{
4848
};
4949

include/nlohmann/detail/macro_scope.hpp

+64-64
Original file line numberDiff line numberDiff line change
@@ -261,70 +261,70 @@
261261
#define NLOHMANN_JSON_EXPAND( x ) x
262262
#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME
263263
#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \
264-
NLOHMANN_JSON_PASTE64, \
265-
NLOHMANN_JSON_PASTE63, \
266-
NLOHMANN_JSON_PASTE62, \
267-
NLOHMANN_JSON_PASTE61, \
268-
NLOHMANN_JSON_PASTE60, \
269-
NLOHMANN_JSON_PASTE59, \
270-
NLOHMANN_JSON_PASTE58, \
271-
NLOHMANN_JSON_PASTE57, \
272-
NLOHMANN_JSON_PASTE56, \
273-
NLOHMANN_JSON_PASTE55, \
274-
NLOHMANN_JSON_PASTE54, \
275-
NLOHMANN_JSON_PASTE53, \
276-
NLOHMANN_JSON_PASTE52, \
277-
NLOHMANN_JSON_PASTE51, \
278-
NLOHMANN_JSON_PASTE50, \
279-
NLOHMANN_JSON_PASTE49, \
280-
NLOHMANN_JSON_PASTE48, \
281-
NLOHMANN_JSON_PASTE47, \
282-
NLOHMANN_JSON_PASTE46, \
283-
NLOHMANN_JSON_PASTE45, \
284-
NLOHMANN_JSON_PASTE44, \
285-
NLOHMANN_JSON_PASTE43, \
286-
NLOHMANN_JSON_PASTE42, \
287-
NLOHMANN_JSON_PASTE41, \
288-
NLOHMANN_JSON_PASTE40, \
289-
NLOHMANN_JSON_PASTE39, \
290-
NLOHMANN_JSON_PASTE38, \
291-
NLOHMANN_JSON_PASTE37, \
292-
NLOHMANN_JSON_PASTE36, \
293-
NLOHMANN_JSON_PASTE35, \
294-
NLOHMANN_JSON_PASTE34, \
295-
NLOHMANN_JSON_PASTE33, \
296-
NLOHMANN_JSON_PASTE32, \
297-
NLOHMANN_JSON_PASTE31, \
298-
NLOHMANN_JSON_PASTE30, \
299-
NLOHMANN_JSON_PASTE29, \
300-
NLOHMANN_JSON_PASTE28, \
301-
NLOHMANN_JSON_PASTE27, \
302-
NLOHMANN_JSON_PASTE26, \
303-
NLOHMANN_JSON_PASTE25, \
304-
NLOHMANN_JSON_PASTE24, \
305-
NLOHMANN_JSON_PASTE23, \
306-
NLOHMANN_JSON_PASTE22, \
307-
NLOHMANN_JSON_PASTE21, \
308-
NLOHMANN_JSON_PASTE20, \
309-
NLOHMANN_JSON_PASTE19, \
310-
NLOHMANN_JSON_PASTE18, \
311-
NLOHMANN_JSON_PASTE17, \
312-
NLOHMANN_JSON_PASTE16, \
313-
NLOHMANN_JSON_PASTE15, \
314-
NLOHMANN_JSON_PASTE14, \
315-
NLOHMANN_JSON_PASTE13, \
316-
NLOHMANN_JSON_PASTE12, \
317-
NLOHMANN_JSON_PASTE11, \
318-
NLOHMANN_JSON_PASTE10, \
319-
NLOHMANN_JSON_PASTE9, \
320-
NLOHMANN_JSON_PASTE8, \
321-
NLOHMANN_JSON_PASTE7, \
322-
NLOHMANN_JSON_PASTE6, \
323-
NLOHMANN_JSON_PASTE5, \
324-
NLOHMANN_JSON_PASTE4, \
325-
NLOHMANN_JSON_PASTE3, \
326-
NLOHMANN_JSON_PASTE2, \
327-
NLOHMANN_JSON_PASTE1)(__VA_ARGS__))
264+
NLOHMANN_JSON_PASTE64, \
265+
NLOHMANN_JSON_PASTE63, \
266+
NLOHMANN_JSON_PASTE62, \
267+
NLOHMANN_JSON_PASTE61, \
268+
NLOHMANN_JSON_PASTE60, \
269+
NLOHMANN_JSON_PASTE59, \
270+
NLOHMANN_JSON_PASTE58, \
271+
NLOHMANN_JSON_PASTE57, \
272+
NLOHMANN_JSON_PASTE56, \
273+
NLOHMANN_JSON_PASTE55, \
274+
NLOHMANN_JSON_PASTE54, \
275+
NLOHMANN_JSON_PASTE53, \
276+
NLOHMANN_JSON_PASTE52, \
277+
NLOHMANN_JSON_PASTE51, \
278+
NLOHMANN_JSON_PASTE50, \
279+
NLOHMANN_JSON_PASTE49, \
280+
NLOHMANN_JSON_PASTE48, \
281+
NLOHMANN_JSON_PASTE47, \
282+
NLOHMANN_JSON_PASTE46, \
283+
NLOHMANN_JSON_PASTE45, \
284+
NLOHMANN_JSON_PASTE44, \
285+
NLOHMANN_JSON_PASTE43, \
286+
NLOHMANN_JSON_PASTE42, \
287+
NLOHMANN_JSON_PASTE41, \
288+
NLOHMANN_JSON_PASTE40, \
289+
NLOHMANN_JSON_PASTE39, \
290+
NLOHMANN_JSON_PASTE38, \
291+
NLOHMANN_JSON_PASTE37, \
292+
NLOHMANN_JSON_PASTE36, \
293+
NLOHMANN_JSON_PASTE35, \
294+
NLOHMANN_JSON_PASTE34, \
295+
NLOHMANN_JSON_PASTE33, \
296+
NLOHMANN_JSON_PASTE32, \
297+
NLOHMANN_JSON_PASTE31, \
298+
NLOHMANN_JSON_PASTE30, \
299+
NLOHMANN_JSON_PASTE29, \
300+
NLOHMANN_JSON_PASTE28, \
301+
NLOHMANN_JSON_PASTE27, \
302+
NLOHMANN_JSON_PASTE26, \
303+
NLOHMANN_JSON_PASTE25, \
304+
NLOHMANN_JSON_PASTE24, \
305+
NLOHMANN_JSON_PASTE23, \
306+
NLOHMANN_JSON_PASTE22, \
307+
NLOHMANN_JSON_PASTE21, \
308+
NLOHMANN_JSON_PASTE20, \
309+
NLOHMANN_JSON_PASTE19, \
310+
NLOHMANN_JSON_PASTE18, \
311+
NLOHMANN_JSON_PASTE17, \
312+
NLOHMANN_JSON_PASTE16, \
313+
NLOHMANN_JSON_PASTE15, \
314+
NLOHMANN_JSON_PASTE14, \
315+
NLOHMANN_JSON_PASTE13, \
316+
NLOHMANN_JSON_PASTE12, \
317+
NLOHMANN_JSON_PASTE11, \
318+
NLOHMANN_JSON_PASTE10, \
319+
NLOHMANN_JSON_PASTE9, \
320+
NLOHMANN_JSON_PASTE8, \
321+
NLOHMANN_JSON_PASTE7, \
322+
NLOHMANN_JSON_PASTE6, \
323+
NLOHMANN_JSON_PASTE5, \
324+
NLOHMANN_JSON_PASTE4, \
325+
NLOHMANN_JSON_PASTE3, \
326+
NLOHMANN_JSON_PASTE2, \
327+
NLOHMANN_JSON_PASTE1)(__VA_ARGS__))
328328
#define NLOHMANN_JSON_PASTE2(func, v1) func(v1)
329329
#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2)
330330
#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3)

include/nlohmann/detail/meta/type_traits.hpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -261,19 +261,19 @@ struct is_default_constructible : std::is_default_constructible<T> {};
261261

262262
template <typename T1, typename T2>
263263
struct is_default_constructible<std::pair<T1, T2>>
264-
: conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};
264+
: conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};
265265

266266
template <typename T1, typename T2>
267267
struct is_default_constructible<const std::pair<T1, T2>>
268-
: conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};
268+
: conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};
269269

270270
template <typename... Ts>
271271
struct is_default_constructible<std::tuple<Ts...>>
272-
: conjunction<is_default_constructible<Ts>...> {};
272+
: conjunction<is_default_constructible<Ts>...> {};
273273

274274
template <typename... Ts>
275275
struct is_default_constructible<const std::tuple<Ts...>>
276-
: conjunction<is_default_constructible<Ts>...> {};
276+
: conjunction<is_default_constructible<Ts>...> {};
277277

278278
template <typename T, typename... Args>
279279
struct is_constructible : std::is_constructible<T, Args...> {};
@@ -454,7 +454,7 @@ struct is_constructible_array_type_impl <
454454
BasicJsonType, ConstructibleArrayType,
455455
enable_if_t<std::is_same<ConstructibleArrayType,
456456
typename BasicJsonType::value_type>::value >>
457-
: std::true_type {};
457+
: std::true_type {};
458458

459459
template<typename BasicJsonType, typename ConstructibleArrayType>
460460
struct is_constructible_array_type_impl <
@@ -471,8 +471,8 @@ is_detected<range_value_t, ConstructibleArrayType>::value&&
471471
// special case for types like std::filesystem::path whose iterator's value_type are themselves
472472
// c.f. https://github.com/nlohmann/json/pull/3073
473473
!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
474-
is_complete_type <
475-
detected_t<range_value_t, ConstructibleArrayType >>::value >>
474+
is_complete_type <
475+
detected_t<range_value_t, ConstructibleArrayType >>::value >>
476476
{
477477
using value_type = range_value_t<ConstructibleArrayType>;
478478

@@ -595,12 +595,12 @@ using is_usable_as_key_type = typename std::conditional <
595595
template<typename BasicJsonType, typename KeyTypeCVRef, bool RequireTransparentComparator = true,
596596
bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>>
597597
using is_usable_as_basic_json_key_type = typename std::conditional <
598-
is_usable_as_key_type<typename BasicJsonType::object_comparator_t,
599-
typename BasicJsonType::object_t::key_type, KeyTypeCVRef,
600-
RequireTransparentComparator, ExcludeObjectKeyType>::value
601-
&& !is_json_iterator_of<BasicJsonType, KeyType>::value,
602-
std::true_type,
603-
std::false_type >::type;
598+
is_usable_as_key_type<typename BasicJsonType::object_comparator_t,
599+
typename BasicJsonType::object_t::key_type, KeyTypeCVRef,
600+
RequireTransparentComparator, ExcludeObjectKeyType>::value
601+
&& !is_json_iterator_of<BasicJsonType, KeyType>::value,
602+
std::true_type,
603+
std::false_type >::type;
604604

605605
template<typename ObjectType, typename KeyType>
606606
using detect_erase_with_key_type = decltype(std::declval<ObjectType&>().erase(std::declval<KeyType>()));

include/nlohmann/detail/output/binary_writer.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ class binary_writer
11621162
@return The calculated size for the BSON document entry for @a j with the given @a name.
11631163
*/
11641164
static std::size_t calc_bson_element_size(const string_t& name,
1165-
const BasicJsonType& j)
1165+
const BasicJsonType& j)
11661166
{
11671167
const auto header_size = calc_bson_entry_header_size(name, j);
11681168
switch (j.type())

0 commit comments

Comments
 (0)