Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
9adb1c02
Unverified
Commit
9adb1c02
authored
May 07, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🏁
do not include <ciso646> unless old MSVC is used #2089
parent
a50a1408
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
87 additions
and
52 deletions
+87
-52
include/nlohmann/detail/boolean_operators.hpp
include/nlohmann/detail/boolean_operators.hpp
+12
-0
include/nlohmann/detail/conversions/from_json.hpp
include/nlohmann/detail/conversions/from_json.hpp
+1
-1
include/nlohmann/detail/conversions/to_chars.hpp
include/nlohmann/detail/conversions/to_chars.hpp
+2
-1
include/nlohmann/detail/conversions/to_json.hpp
include/nlohmann/detail/conversions/to_json.hpp
+1
-1
include/nlohmann/detail/iterators/iter_impl.hpp
include/nlohmann/detail/iterators/iter_impl.hpp
+1
-1
include/nlohmann/detail/meta/cpp_future.hpp
include/nlohmann/detail/meta/cpp_future.hpp
+2
-1
include/nlohmann/detail/meta/type_traits.hpp
include/nlohmann/detail/meta/type_traits.hpp
+1
-1
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-1
include/nlohmann/detail/value_t.hpp
include/nlohmann/detail/value_t.hpp
+2
-1
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+1
-1
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+63
-43
No files found.
include/nlohmann/detail/boolean_operators.hpp
0 → 100644
View file @
9adb1c02
#pragma once
#include <nlohmann/detail/macro_scope.hpp>
// Header <ciso646> is needed for older MSVC versions to allow to use the
// alternative operator representations "and", "or", and "not". As the header
// is removed in C++20, we must only include it for old MSVC versions.
// See <https://github.com/nlohmann/json/issues/2089> for more information.
#if !JSON_HEDLEY_MSVC_VERSION_CHECK(15,5,0)
#include <ciso646> // and, not, or
#endif
include/nlohmann/detail/conversions/from_json.hpp
View file @
9adb1c02
...
...
@@ -2,7 +2,6 @@
#include <algorithm> // transform
#include <array> // array
#include <ciso646> // and, not
#include <forward_list> // forward_list
#include <iterator> // inserter, front_inserter, end
#include <map> // map
...
...
@@ -13,6 +12,7 @@
#include <utility> // pair, declval
#include <valarray> // valarray
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
...
...
include/nlohmann/detail/conversions/to_chars.hpp
View file @
9adb1c02
...
...
@@ -2,12 +2,13 @@
#include <array> // array
#include <cassert> // assert
#include <ciso646> // or, and, not
#include <cmath> // signbit, isfinite
#include <cstdint> // intN_t, uintN_t
#include <cstring> // memcpy, memmove
#include <limits> // numeric_limits
#include <type_traits> // conditional
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace
nlohmann
...
...
include/nlohmann/detail/conversions/to_json.hpp
View file @
9adb1c02
#pragma once
#include <algorithm> // copy
#include <ciso646> // or, and, not
#include <iterator> // begin, end
#include <string> // string
#include <tuple> // tuple, get
...
...
@@ -10,6 +9,7 @@
#include <valarray> // valarray
#include <vector> // vector
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
...
...
include/nlohmann/detail/iterators/iter_impl.hpp
View file @
9adb1c02
#pragma once
#include <ciso646> // not
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
#include <type_traits> // conditional, is_const, remove_const
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/iterators/internal_iterator.hpp>
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
...
...
include/nlohmann/detail/meta/cpp_future.hpp
View file @
9adb1c02
#pragma once
#include <ciso646> // not
#include <cstddef> // size_t
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
#include <nlohmann/detail/boolean_operators.hpp>
namespace
nlohmann
{
namespace
detail
...
...
include/nlohmann/detail/meta/type_traits.hpp
View file @
9adb1c02
#pragma once
#include <ciso646> // not
#include <limits> // numeric_limits
#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type
#include <utility> // declval
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/iterators/iterator_traits.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
...
...
include/nlohmann/detail/output/serializer.hpp
View file @
9adb1c02
...
...
@@ -3,7 +3,6 @@
#include <algorithm> // reverse, remove, fill, find, none_of
#include <array> // array
#include <cassert> // assert
#include <ciso646> // and, or
#include <clocale> // localeconv, lconv
#include <cmath> // labs, isfinite, isnan, signbit
#include <cstddef> // size_t, ptrdiff_t
...
...
@@ -14,6 +13,7 @@
#include <type_traits> // is_same
#include <utility> // move
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/conversions/to_chars.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
...
...
include/nlohmann/detail/value_t.hpp
View file @
9adb1c02
#pragma once
#include <array> // array
#include <ciso646> // and
#include <cstddef> // size_t
#include <cstdint> // uint8_t
#include <string> // string
#include <nlohmann/detail/boolean_operators.hpp>
namespace
nlohmann
{
namespace
detail
...
...
include/nlohmann/json.hpp
View file @
9adb1c02
...
...
@@ -36,7 +36,6 @@ SOFTWARE.
#include <algorithm> // all_of, find, for_each
#include <cassert> // assert
#include <ciso646> // and, not, or
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
#include <functional> // hash, less
#include <initializer_list> // initializer_list
...
...
@@ -49,6 +48,7 @@ SOFTWARE.
#include <vector> // vector
#include <nlohmann/adl_serializer.hpp>
#include <nlohmann/detail/boolean_operators.hpp>
#include <nlohmann/detail/conversions/from_json.hpp>
#include <nlohmann/detail/conversions/to_json.hpp>
#include <nlohmann/detail/exceptions.hpp>
...
...
single_include/nlohmann/json.hpp
View file @
9adb1c02
...
...
@@ -36,7 +36,6 @@ SOFTWARE.
#include <algorithm> // all_of, find, for_each
#include <cassert> // assert
#include <ciso646> // and, not, or
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
#include <functional> // hash, less
#include <initializer_list> // initializer_list
...
...
@@ -58,7 +57,6 @@ SOFTWARE.
#include <algorithm> // transform
#include <array> // array
#include <ciso646> // and, not
#include <forward_list> // forward_list
#include <iterator> // inserter, front_inserter, end
#include <map> // map
...
...
@@ -69,41 +67,8 @@ SOFTWARE.
#include <utility> // pair, declval
#include <valarray> // valarray
// #include <nlohmann/detail/exceptions.hpp>
// #include <nlohmann/detail/boolean_operators.hpp>
#include <exception> // exception
#include <stdexcept> // runtime_error
#include <string> // to_string
// #include <nlohmann/detail/input/position_t.hpp>
#include <cstddef> // size_t
namespace
nlohmann
{
namespace
detail
{
/// struct to capture the start position of the current token
struct
position_t
{
/// the total number of characters read
std
::
size_t
chars_read_total
=
0
;
/// the number of characters read in the current line
std
::
size_t
chars_read_current_line
=
0
;
/// the number of lines read
std
::
size_t
lines_read
=
0
;
/// conversion to size_t to preserve SAX interface
constexpr
operator
size_t
()
const
{
return
chars_read_total
;
}
};
}
// namespace detail
}
// namespace nlohmann
// #include <nlohmann/detail/macro_scope.hpp>
...
...
@@ -2142,6 +2107,49 @@ JSON_HEDLEY_DIAGNOSTIC_POP
AllocatorType, JSONSerializer, BinaryType>
#if !JSON_HEDLEY_MSVC_VERSION_CHECK(15,5,0)
#include <ciso646> // and, not, or
#endif
// #include <nlohmann/detail/exceptions.hpp>
#include <exception> // exception
#include <stdexcept> // runtime_error
#include <string> // to_string
// #include <nlohmann/detail/input/position_t.hpp>
#include <cstddef> // size_t
namespace
nlohmann
{
namespace
detail
{
/// struct to capture the start position of the current token
struct
position_t
{
/// the total number of characters read
std
::
size_t
chars_read_total
=
0
;
/// the number of characters read in the current line
std
::
size_t
chars_read_current_line
=
0
;
/// the number of lines read
std
::
size_t
lines_read
=
0
;
/// conversion to size_t to preserve SAX interface
constexpr
operator
size_t
()
const
{
return
chars_read_total
;
}
};
}
// namespace detail
}
// namespace nlohmann
// #include <nlohmann/detail/macro_scope.hpp>
namespace
nlohmann
{
namespace
detail
...
...
@@ -2495,10 +2503,12 @@ class other_error : public exception
// #include <nlohmann/detail/meta/cpp_future.hpp>
#include <ciso646> // not
#include <cstddef> // size_t
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
// #include <nlohmann/detail/boolean_operators.hpp>
namespace
nlohmann
{
namespace
detail
...
...
@@ -2560,11 +2570,12 @@ constexpr T static_const<T>::value;
// #include <nlohmann/detail/meta/type_traits.hpp>
#include <ciso646> // not
#include <limits> // numeric_limits
#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type
#include <utility> // declval
// #include <nlohmann/detail/boolean_operators.hpp>
// #include <nlohmann/detail/iterators/iterator_traits.hpp>
...
...
@@ -3145,11 +3156,13 @@ struct is_constructible_tuple<T1, std::tuple<Args...>> : conjunction<std::is_con
#include <array> // array
#include <ciso646> // and
#include <cstddef> // size_t
#include <cstdint> // uint8_t
#include <string> // string
// #include <nlohmann/detail/boolean_operators.hpp>
namespace
nlohmann
{
namespace
detail
...
...
@@ -3599,7 +3612,6 @@ constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::va
#include <algorithm> // copy
#include <ciso646> // or, and, not
#include <iterator> // begin, end
#include <string> // string
#include <tuple> // tuple, get
...
...
@@ -3608,6 +3620,8 @@ constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::va
#include <valarray> // valarray
#include <vector> // vector
// #include <nlohmann/detail/boolean_operators.hpp>
// #include <nlohmann/detail/iterators/iteration_proxy.hpp>
...
...
@@ -4192,6 +4206,8 @@ struct adl_serializer
}
// namespace nlohmann
// #include <nlohmann/detail/boolean_operators.hpp>
// #include <nlohmann/detail/conversions/from_json.hpp>
// #include <nlohmann/detail/conversions/to_json.hpp>
...
...
@@ -10034,10 +10050,11 @@ template<typename BasicJsonType> struct internal_iterator
// #include <nlohmann/detail/iterators/iter_impl.hpp>
#include <ciso646> // not
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
#include <type_traits> // conditional, is_const, remove_const
// #include <nlohmann/detail/boolean_operators.hpp>
// #include <nlohmann/detail/exceptions.hpp>
// #include <nlohmann/detail/iterators/internal_iterator.hpp>
...
...
@@ -13543,7 +13560,6 @@ class binary_writer
#include <algorithm> // reverse, remove, fill, find, none_of
#include <array> // array
#include <cassert> // assert
#include <ciso646> // and, or
#include <clocale> // localeconv, lconv
#include <cmath> // labs, isfinite, isnan, signbit
#include <cstddef> // size_t, ptrdiff_t
...
...
@@ -13554,17 +13570,21 @@ class binary_writer
#include <type_traits> // is_same
#include <utility> // move
// #include <nlohmann/detail/boolean_operators.hpp>
// #include <nlohmann/detail/conversions/to_chars.hpp>
#include <array> // array
#include <cassert> // assert
#include <ciso646> // or, and, not
#include <cmath> // signbit, isfinite
#include <cstdint> // intN_t, uintN_t
#include <cstring> // memcpy, memmove
#include <limits> // numeric_limits
#include <type_traits> // conditional
// #include <nlohmann/detail/boolean_operators.hpp>
// #include <nlohmann/detail/macro_scope.hpp>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment