mqt-core 3.0.2__cp313-cp313t-win_amd64.whl → 3.1.0__cp313-cp313t-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mqt-core might be problematic. Click here for more details.

Files changed (105) hide show
  1. mqt/core/__init__.py +3 -3
  2. mqt/core/_version.py +2 -2
  3. mqt/core/bin/mqt-core-algorithms.dll +0 -0
  4. mqt/core/bin/mqt-core-circuit-optimizer.dll +0 -0
  5. mqt/core/bin/mqt-core-dd.dll +0 -0
  6. mqt/core/bin/mqt-core-ds.dll +0 -0
  7. mqt/core/bin/mqt-core-ir.dll +0 -0
  8. mqt/core/bin/mqt-core-na.dll +0 -0
  9. mqt/core/bin/mqt-core-qasm.dll +0 -0
  10. mqt/core/bin/mqt-core-zx.dll +0 -0
  11. mqt/core/dd.cp313t-win_amd64.pyd +0 -0
  12. mqt/core/include/mqt-core/dd/Approximation.hpp +45 -0
  13. mqt/core/include/mqt-core/dd/Complex.hpp +6 -0
  14. mqt/core/include/mqt-core/dd/ComplexNumbers.hpp +0 -18
  15. mqt/core/include/mqt-core/dd/ComputeTable.hpp +4 -1
  16. mqt/core/include/mqt-core/dd/DDDefinitions.hpp +0 -7
  17. mqt/core/include/mqt-core/dd/Edge.hpp +16 -0
  18. mqt/core/include/mqt-core/dd/Export.hpp +1 -2
  19. mqt/core/include/mqt-core/dd/Node.hpp +26 -49
  20. mqt/core/include/mqt-core/dd/Operations.hpp +27 -0
  21. mqt/core/include/mqt-core/dd/Package.hpp +138 -120
  22. mqt/core/include/mqt-core/dd/RealNumber.hpp +49 -66
  23. mqt/core/include/mqt-core/dd/RealNumberUniqueTable.hpp +14 -25
  24. mqt/core/include/mqt-core/dd/StateGeneration.hpp +143 -0
  25. mqt/core/include/mqt-core/dd/UnaryComputeTable.hpp +6 -4
  26. mqt/core/include/mqt-core/dd/UniqueTable.hpp +13 -39
  27. mqt/core/include/mqt-core/dd/statistics/PackageStatistics.hpp +8 -7
  28. mqt/core/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp +0 -10
  29. mqt/core/include/mqt-core/ir/QuantumComputation.hpp +3 -0
  30. mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +2 -0
  31. mqt/core/include/mqt-core/ir/operations/Operation.hpp +2 -2
  32. mqt/core/ir.cp313t-win_amd64.pyd +0 -0
  33. mqt/core/lib/mqt-core-algorithms.lib +0 -0
  34. mqt/core/lib/mqt-core-circuit-optimizer.lib +0 -0
  35. mqt/core/lib/mqt-core-dd.lib +0 -0
  36. mqt/core/lib/mqt-core-ds.lib +0 -0
  37. mqt/core/lib/mqt-core-ir.lib +0 -0
  38. mqt/core/lib/mqt-core-na.lib +0 -0
  39. mqt/core/lib/mqt-core-qasm.lib +0 -0
  40. mqt/core/lib/mqt-core-zx.lib +0 -0
  41. mqt/core/plugins/__init__.py +0 -8
  42. mqt/core/plugins/qiskit/qiskit_to_mqt.py +6 -0
  43. mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +52 -0
  44. mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +4 -4
  45. mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +3 -3
  46. mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +1 -0
  47. mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +1 -1
  48. mqt_core-3.1.0.dist-info/DELVEWHEEL +2 -0
  49. {mqt_core-3.0.2.dist-info → mqt_core-3.1.0.dist-info}/METADATA +46 -21
  50. {mqt_core-3.0.2.dist-info → mqt_core-3.1.0.dist-info}/RECORD +54 -101
  51. {mqt_core-3.0.2.dist-info → mqt_core-3.1.0.dist-info}/WHEEL +1 -1
  52. mqt_core.libs/msvcp140.dll +0 -0
  53. mqt/core/include/nlohmann/adl_serializer.hpp +0 -55
  54. mqt/core/include/nlohmann/byte_container_with_subtype.hpp +0 -103
  55. mqt/core/include/nlohmann/detail/abi_macros.hpp +0 -100
  56. mqt/core/include/nlohmann/detail/conversions/from_json.hpp +0 -497
  57. mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +0 -1118
  58. mqt/core/include/nlohmann/detail/conversions/to_json.hpp +0 -446
  59. mqt/core/include/nlohmann/detail/exceptions.hpp +0 -257
  60. mqt/core/include/nlohmann/detail/hash.hpp +0 -129
  61. mqt/core/include/nlohmann/detail/input/binary_reader.hpp +0 -3009
  62. mqt/core/include/nlohmann/detail/input/input_adapters.hpp +0 -492
  63. mqt/core/include/nlohmann/detail/input/json_sax.hpp +0 -727
  64. mqt/core/include/nlohmann/detail/input/lexer.hpp +0 -1633
  65. mqt/core/include/nlohmann/detail/input/parser.hpp +0 -519
  66. mqt/core/include/nlohmann/detail/input/position_t.hpp +0 -37
  67. mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +0 -35
  68. mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +0 -751
  69. mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +0 -242
  70. mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +0 -61
  71. mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +0 -130
  72. mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +0 -132
  73. mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +0 -39
  74. mqt/core/include/nlohmann/detail/json_pointer.hpp +0 -988
  75. mqt/core/include/nlohmann/detail/json_ref.hpp +0 -78
  76. mqt/core/include/nlohmann/detail/macro_scope.hpp +0 -482
  77. mqt/core/include/nlohmann/detail/macro_unscope.hpp +0 -45
  78. mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +0 -17
  79. mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +0 -17
  80. mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +0 -171
  81. mqt/core/include/nlohmann/detail/meta/detected.hpp +0 -70
  82. mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +0 -21
  83. mqt/core/include/nlohmann/detail/meta/is_sax.hpp +0 -159
  84. mqt/core/include/nlohmann/detail/meta/std_fs.hpp +0 -29
  85. mqt/core/include/nlohmann/detail/meta/type_traits.hpp +0 -795
  86. mqt/core/include/nlohmann/detail/meta/void_t.hpp +0 -24
  87. mqt/core/include/nlohmann/detail/output/binary_writer.hpp +0 -1838
  88. mqt/core/include/nlohmann/detail/output/output_adapters.hpp +0 -147
  89. mqt/core/include/nlohmann/detail/output/serializer.hpp +0 -988
  90. mqt/core/include/nlohmann/detail/string_concat.hpp +0 -146
  91. mqt/core/include/nlohmann/detail/string_escape.hpp +0 -72
  92. mqt/core/include/nlohmann/detail/value_t.hpp +0 -118
  93. mqt/core/include/nlohmann/json.hpp +0 -5258
  94. mqt/core/include/nlohmann/json_fwd.hpp +0 -75
  95. mqt/core/include/nlohmann/ordered_map.hpp +0 -359
  96. mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +0 -2045
  97. mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +0 -158
  98. mqt/core/nlohmann_json.natvis +0 -278
  99. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +0 -15
  100. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +0 -20
  101. mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +0 -110
  102. mqt/core/share/pkgconfig/nlohmann_json.pc +0 -4
  103. mqt_core-3.0.2.dist-info/DELVEWHEEL +0 -2
  104. {mqt_core-3.0.2.dist-info → mqt_core-3.1.0.dist-info}/entry_points.txt +0 -0
  105. {mqt_core-3.0.2.dist-info → mqt_core-3.1.0.dist-info}/licenses/LICENSE.md +0 -0
@@ -1,242 +0,0 @@
1
- // __ _____ _____ _____
2
- // __| | __| | | | JSON for Modern C++
3
- // | | |__ | | | | | | version 3.11.3
4
- // |_____|_____|_____|_|___| https://github.com/nlohmann/json
5
- //
6
- // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7
- // SPDX-License-Identifier: MIT
8
-
9
- #pragma once
10
-
11
- #include <cstddef> // size_t
12
- #include <iterator> // input_iterator_tag
13
- #include <string> // string, to_string
14
- #include <tuple> // tuple_size, get, tuple_element
15
- #include <utility> // move
16
-
17
- #if JSON_HAS_RANGES
18
- #include <ranges> // enable_borrowed_range
19
- #endif
20
-
21
- #include <nlohmann/detail/abi_macros.hpp>
22
- #include <nlohmann/detail/meta/type_traits.hpp>
23
- #include <nlohmann/detail/value_t.hpp>
24
-
25
- NLOHMANN_JSON_NAMESPACE_BEGIN
26
- namespace detail
27
- {
28
-
29
- template<typename string_type>
30
- void int_to_string( string_type& target, std::size_t value )
31
- {
32
- // For ADL
33
- using std::to_string;
34
- target = to_string(value);
35
- }
36
- template<typename IteratorType> class iteration_proxy_value
37
- {
38
- public:
39
- using difference_type = std::ptrdiff_t;
40
- using value_type = iteration_proxy_value;
41
- using pointer = value_type *;
42
- using reference = value_type &;
43
- using iterator_category = std::input_iterator_tag;
44
- using string_type = typename std::remove_cv< typename std::remove_reference<decltype( std::declval<IteratorType>().key() ) >::type >::type;
45
-
46
- private:
47
- /// the iterator
48
- IteratorType anchor{};
49
- /// an index for arrays (used to create key names)
50
- std::size_t array_index = 0;
51
- /// last stringified array index
52
- mutable std::size_t array_index_last = 0;
53
- /// a string representation of the array index
54
- mutable string_type array_index_str = "0";
55
- /// an empty string (to return a reference for primitive values)
56
- string_type empty_str{};
57
-
58
- public:
59
- explicit iteration_proxy_value() = default;
60
- explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0)
61
- noexcept(std::is_nothrow_move_constructible<IteratorType>::value
62
- && std::is_nothrow_default_constructible<string_type>::value)
63
- : anchor(std::move(it))
64
- , array_index(array_index_)
65
- {}
66
-
67
- iteration_proxy_value(iteration_proxy_value const&) = default;
68
- iteration_proxy_value& operator=(iteration_proxy_value const&) = default;
69
- // older GCCs are a bit fussy and require explicit noexcept specifiers on defaulted functions
70
- iteration_proxy_value(iteration_proxy_value&&)
71
- noexcept(std::is_nothrow_move_constructible<IteratorType>::value
72
- && std::is_nothrow_move_constructible<string_type>::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor,cppcoreguidelines-noexcept-move-operations)
73
- iteration_proxy_value& operator=(iteration_proxy_value&&)
74
- noexcept(std::is_nothrow_move_assignable<IteratorType>::value
75
- && std::is_nothrow_move_assignable<string_type>::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor,cppcoreguidelines-noexcept-move-operations)
76
- ~iteration_proxy_value() = default;
77
-
78
- /// dereference operator (needed for range-based for)
79
- const iteration_proxy_value& operator*() const
80
- {
81
- return *this;
82
- }
83
-
84
- /// increment operator (needed for range-based for)
85
- iteration_proxy_value& operator++()
86
- {
87
- ++anchor;
88
- ++array_index;
89
-
90
- return *this;
91
- }
92
-
93
- iteration_proxy_value operator++(int)& // NOLINT(cert-dcl21-cpp)
94
- {
95
- auto tmp = iteration_proxy_value(anchor, array_index);
96
- ++anchor;
97
- ++array_index;
98
- return tmp;
99
- }
100
-
101
- /// equality operator (needed for InputIterator)
102
- bool operator==(const iteration_proxy_value& o) const
103
- {
104
- return anchor == o.anchor;
105
- }
106
-
107
- /// inequality operator (needed for range-based for)
108
- bool operator!=(const iteration_proxy_value& o) const
109
- {
110
- return anchor != o.anchor;
111
- }
112
-
113
- /// return key of the iterator
114
- const string_type& key() const
115
- {
116
- JSON_ASSERT(anchor.m_object != nullptr);
117
-
118
- switch (anchor.m_object->type())
119
- {
120
- // use integer array index as key
121
- case value_t::array:
122
- {
123
- if (array_index != array_index_last)
124
- {
125
- int_to_string( array_index_str, array_index );
126
- array_index_last = array_index;
127
- }
128
- return array_index_str;
129
- }
130
-
131
- // use key from the object
132
- case value_t::object:
133
- return anchor.key();
134
-
135
- // use an empty key for all primitive types
136
- case value_t::null:
137
- case value_t::string:
138
- case value_t::boolean:
139
- case value_t::number_integer:
140
- case value_t::number_unsigned:
141
- case value_t::number_float:
142
- case value_t::binary:
143
- case value_t::discarded:
144
- default:
145
- return empty_str;
146
- }
147
- }
148
-
149
- /// return value of the iterator
150
- typename IteratorType::reference value() const
151
- {
152
- return anchor.value();
153
- }
154
- };
155
-
156
- /// proxy class for the items() function
157
- template<typename IteratorType> class iteration_proxy
158
- {
159
- private:
160
- /// the container to iterate
161
- typename IteratorType::pointer container = nullptr;
162
-
163
- public:
164
- explicit iteration_proxy() = default;
165
-
166
- /// construct iteration proxy from a container
167
- explicit iteration_proxy(typename IteratorType::reference cont) noexcept
168
- : container(&cont) {}
169
-
170
- iteration_proxy(iteration_proxy const&) = default;
171
- iteration_proxy& operator=(iteration_proxy const&) = default;
172
- iteration_proxy(iteration_proxy&&) noexcept = default;
173
- iteration_proxy& operator=(iteration_proxy&&) noexcept = default;
174
- ~iteration_proxy() = default;
175
-
176
- /// return iterator begin (needed for range-based for)
177
- iteration_proxy_value<IteratorType> begin() const noexcept
178
- {
179
- return iteration_proxy_value<IteratorType>(container->begin());
180
- }
181
-
182
- /// return iterator end (needed for range-based for)
183
- iteration_proxy_value<IteratorType> end() const noexcept
184
- {
185
- return iteration_proxy_value<IteratorType>(container->end());
186
- }
187
- };
188
-
189
- // Structured Bindings Support
190
- // For further reference see https://blog.tartanllama.xyz/structured-bindings/
191
- // And see https://github.com/nlohmann/json/pull/1391
192
- template<std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0>
193
- auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key())
194
- {
195
- return i.key();
196
- }
197
- // Structured Bindings Support
198
- // For further reference see https://blog.tartanllama.xyz/structured-bindings/
199
- // And see https://github.com/nlohmann/json/pull/1391
200
- template<std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0>
201
- auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value())
202
- {
203
- return i.value();
204
- }
205
-
206
- } // namespace detail
207
- NLOHMANN_JSON_NAMESPACE_END
208
-
209
- // The Addition to the STD Namespace is required to add
210
- // Structured Bindings Support to the iteration_proxy_value class
211
- // For further reference see https://blog.tartanllama.xyz/structured-bindings/
212
- // And see https://github.com/nlohmann/json/pull/1391
213
- namespace std
214
- {
215
-
216
- #if defined(__clang__)
217
- // Fix: https://github.com/nlohmann/json/issues/1401
218
- #pragma clang diagnostic push
219
- #pragma clang diagnostic ignored "-Wmismatched-tags"
220
- #endif
221
- template<typename IteratorType>
222
- class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> // NOLINT(cert-dcl58-cpp)
223
- : public std::integral_constant<std::size_t, 2> {};
224
-
225
- template<std::size_t N, typename IteratorType>
226
- class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> // NOLINT(cert-dcl58-cpp)
227
- {
228
- public:
229
- using type = decltype(
230
- get<N>(std::declval <
231
- ::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
232
- };
233
- #if defined(__clang__)
234
- #pragma clang diagnostic pop
235
- #endif
236
-
237
- } // namespace std
238
-
239
- #if JSON_HAS_RANGES
240
- template <typename IteratorType>
241
- inline constexpr bool ::std::ranges::enable_borrowed_range<::nlohmann::detail::iteration_proxy<IteratorType>> = true;
242
- #endif
@@ -1,61 +0,0 @@
1
- // __ _____ _____ _____
2
- // __| | __| | | | JSON for Modern C++
3
- // | | |__ | | | | | | version 3.11.3
4
- // |_____|_____|_____|_|___| https://github.com/nlohmann/json
5
- //
6
- // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7
- // SPDX-License-Identifier: MIT
8
-
9
- #pragma once
10
-
11
- #include <iterator> // random_access_iterator_tag
12
-
13
- #include <nlohmann/detail/abi_macros.hpp>
14
- #include <nlohmann/detail/meta/void_t.hpp>
15
- #include <nlohmann/detail/meta/cpp_future.hpp>
16
-
17
- NLOHMANN_JSON_NAMESPACE_BEGIN
18
- namespace detail
19
- {
20
-
21
- template<typename It, typename = void>
22
- struct iterator_types {};
23
-
24
- template<typename It>
25
- struct iterator_types <
26
- It,
27
- void_t<typename It::difference_type, typename It::value_type, typename It::pointer,
28
- typename It::reference, typename It::iterator_category >>
29
- {
30
- using difference_type = typename It::difference_type;
31
- using value_type = typename It::value_type;
32
- using pointer = typename It::pointer;
33
- using reference = typename It::reference;
34
- using iterator_category = typename It::iterator_category;
35
- };
36
-
37
- // This is required as some compilers implement std::iterator_traits in a way that
38
- // doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341.
39
- template<typename T, typename = void>
40
- struct iterator_traits
41
- {
42
- };
43
-
44
- template<typename T>
45
- struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >>
46
- : iterator_types<T>
47
- {
48
- };
49
-
50
- template<typename T>
51
- struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>
52
- {
53
- using iterator_category = std::random_access_iterator_tag;
54
- using value_type = T;
55
- using difference_type = ptrdiff_t;
56
- using pointer = T*;
57
- using reference = T&;
58
- };
59
-
60
- } // namespace detail
61
- NLOHMANN_JSON_NAMESPACE_END
@@ -1,130 +0,0 @@
1
- // __ _____ _____ _____
2
- // __| | __| | | | JSON for Modern C++
3
- // | | |__ | | | | | | version 3.11.3
4
- // |_____|_____|_____|_|___| https://github.com/nlohmann/json
5
- //
6
- // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7
- // SPDX-License-Identifier: MIT
8
-
9
- #pragma once
10
-
11
- #include <cstddef> // ptrdiff_t
12
- #include <iterator> // reverse_iterator
13
- #include <utility> // declval
14
-
15
- #include <nlohmann/detail/abi_macros.hpp>
16
-
17
- NLOHMANN_JSON_NAMESPACE_BEGIN
18
- namespace detail
19
- {
20
-
21
- //////////////////////
22
- // reverse_iterator //
23
- //////////////////////
24
-
25
- /*!
26
- @brief a template for a reverse iterator class
27
-
28
- @tparam Base the base iterator type to reverse. Valid types are @ref
29
- iterator (to create @ref reverse_iterator) and @ref const_iterator (to
30
- create @ref const_reverse_iterator).
31
-
32
- @requirement The class satisfies the following concept requirements:
33
- -
34
- [BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator):
35
- The iterator that can be moved can be moved in both directions (i.e.
36
- incremented and decremented).
37
- - [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator):
38
- It is possible to write to the pointed-to element (only if @a Base is
39
- @ref iterator).
40
-
41
- @since version 1.0.0
42
- */
43
- template<typename Base>
44
- class json_reverse_iterator : public std::reverse_iterator<Base>
45
- {
46
- public:
47
- using difference_type = std::ptrdiff_t;
48
- /// shortcut to the reverse iterator adapter
49
- using base_iterator = std::reverse_iterator<Base>;
50
- /// the reference type for the pointed-to element
51
- using reference = typename Base::reference;
52
-
53
- /// create reverse iterator from iterator
54
- explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept
55
- : base_iterator(it) {}
56
-
57
- /// create reverse iterator from base class
58
- explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {}
59
-
60
- /// post-increment (it++)
61
- json_reverse_iterator operator++(int)& // NOLINT(cert-dcl21-cpp)
62
- {
63
- return static_cast<json_reverse_iterator>(base_iterator::operator++(1));
64
- }
65
-
66
- /// pre-increment (++it)
67
- json_reverse_iterator& operator++()
68
- {
69
- return static_cast<json_reverse_iterator&>(base_iterator::operator++());
70
- }
71
-
72
- /// post-decrement (it--)
73
- json_reverse_iterator operator--(int)& // NOLINT(cert-dcl21-cpp)
74
- {
75
- return static_cast<json_reverse_iterator>(base_iterator::operator--(1));
76
- }
77
-
78
- /// pre-decrement (--it)
79
- json_reverse_iterator& operator--()
80
- {
81
- return static_cast<json_reverse_iterator&>(base_iterator::operator--());
82
- }
83
-
84
- /// add to iterator
85
- json_reverse_iterator& operator+=(difference_type i)
86
- {
87
- return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i));
88
- }
89
-
90
- /// add to iterator
91
- json_reverse_iterator operator+(difference_type i) const
92
- {
93
- return static_cast<json_reverse_iterator>(base_iterator::operator+(i));
94
- }
95
-
96
- /// subtract from iterator
97
- json_reverse_iterator operator-(difference_type i) const
98
- {
99
- return static_cast<json_reverse_iterator>(base_iterator::operator-(i));
100
- }
101
-
102
- /// return difference
103
- difference_type operator-(const json_reverse_iterator& other) const
104
- {
105
- return base_iterator(*this) - base_iterator(other);
106
- }
107
-
108
- /// access to successor
109
- reference operator[](difference_type n) const
110
- {
111
- return *(this->operator+(n));
112
- }
113
-
114
- /// return the key of an object iterator
115
- auto key() const -> decltype(std::declval<Base>().key())
116
- {
117
- auto it = --this->base();
118
- return it.key();
119
- }
120
-
121
- /// return the value of an iterator
122
- reference value() const
123
- {
124
- auto it = --this->base();
125
- return it.operator * ();
126
- }
127
- };
128
-
129
- } // namespace detail
130
- NLOHMANN_JSON_NAMESPACE_END
@@ -1,132 +0,0 @@
1
- // __ _____ _____ _____
2
- // __| | __| | | | JSON for Modern C++
3
- // | | |__ | | | | | | version 3.11.3
4
- // |_____|_____|_____|_|___| https://github.com/nlohmann/json
5
- //
6
- // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7
- // SPDX-License-Identifier: MIT
8
-
9
- #pragma once
10
-
11
- #include <cstddef> // ptrdiff_t
12
- #include <limits> // numeric_limits
13
-
14
- #include <nlohmann/detail/macro_scope.hpp>
15
-
16
- NLOHMANN_JSON_NAMESPACE_BEGIN
17
- namespace detail
18
- {
19
-
20
- /*
21
- @brief an iterator for primitive JSON types
22
-
23
- This class models an iterator for primitive JSON types (boolean, number,
24
- string). It's only purpose is to allow the iterator/const_iterator classes
25
- to "iterate" over primitive values. Internally, the iterator is modeled by
26
- a `difference_type` variable. Value begin_value (`0`) models the begin,
27
- end_value (`1`) models past the end.
28
- */
29
- class primitive_iterator_t
30
- {
31
- private:
32
- using difference_type = std::ptrdiff_t;
33
- static constexpr difference_type begin_value = 0;
34
- static constexpr difference_type end_value = begin_value + 1;
35
-
36
- JSON_PRIVATE_UNLESS_TESTED:
37
- /// iterator as signed integer type
38
- difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)();
39
-
40
- public:
41
- constexpr difference_type get_value() const noexcept
42
- {
43
- return m_it;
44
- }
45
-
46
- /// set iterator to a defined beginning
47
- void set_begin() noexcept
48
- {
49
- m_it = begin_value;
50
- }
51
-
52
- /// set iterator to a defined past the end
53
- void set_end() noexcept
54
- {
55
- m_it = end_value;
56
- }
57
-
58
- /// return whether the iterator can be dereferenced
59
- constexpr bool is_begin() const noexcept
60
- {
61
- return m_it == begin_value;
62
- }
63
-
64
- /// return whether the iterator is at end
65
- constexpr bool is_end() const noexcept
66
- {
67
- return m_it == end_value;
68
- }
69
-
70
- friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
71
- {
72
- return lhs.m_it == rhs.m_it;
73
- }
74
-
75
- friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
76
- {
77
- return lhs.m_it < rhs.m_it;
78
- }
79
-
80
- primitive_iterator_t operator+(difference_type n) noexcept
81
- {
82
- auto result = *this;
83
- result += n;
84
- return result;
85
- }
86
-
87
- friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
88
- {
89
- return lhs.m_it - rhs.m_it;
90
- }
91
-
92
- primitive_iterator_t& operator++() noexcept
93
- {
94
- ++m_it;
95
- return *this;
96
- }
97
-
98
- primitive_iterator_t operator++(int)& noexcept // NOLINT(cert-dcl21-cpp)
99
- {
100
- auto result = *this;
101
- ++m_it;
102
- return result;
103
- }
104
-
105
- primitive_iterator_t& operator--() noexcept
106
- {
107
- --m_it;
108
- return *this;
109
- }
110
-
111
- primitive_iterator_t operator--(int)& noexcept // NOLINT(cert-dcl21-cpp)
112
- {
113
- auto result = *this;
114
- --m_it;
115
- return result;
116
- }
117
-
118
- primitive_iterator_t& operator+=(difference_type n) noexcept
119
- {
120
- m_it += n;
121
- return *this;
122
- }
123
-
124
- primitive_iterator_t& operator-=(difference_type n) noexcept
125
- {
126
- m_it -= n;
127
- return *this;
128
- }
129
- };
130
-
131
- } // namespace detail
132
- NLOHMANN_JSON_NAMESPACE_END
@@ -1,39 +0,0 @@
1
- // __ _____ _____ _____
2
- // __| | __| | | | JSON for Modern C++
3
- // | | |__ | | | | | | version 3.11.3
4
- // |_____|_____|_____|_|___| https://github.com/nlohmann/json
5
- //
6
- // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
7
- // SPDX-License-Identifier: MIT
8
-
9
- #pragma once
10
-
11
- #include <type_traits> // conditional, is_same
12
-
13
- #include <nlohmann/detail/abi_macros.hpp>
14
-
15
- NLOHMANN_JSON_NAMESPACE_BEGIN
16
- namespace detail
17
- {
18
-
19
- /*!
20
- @brief Default base class of the @ref basic_json class.
21
-
22
- So that the correct implementations of the copy / move ctors / assign operators
23
- of @ref basic_json do not require complex case distinctions
24
- (no base class / custom base class used as customization point),
25
- @ref basic_json always has a base class.
26
- By default, this class is used because it is empty and thus has no effect
27
- on the behavior of @ref basic_json.
28
- */
29
- struct json_default_base {};
30
-
31
- template<class T>
32
- using json_base_class = typename std::conditional <
33
- std::is_same<T, void>::value,
34
- json_default_base,
35
- T
36
- >::type;
37
-
38
- } // namespace detail
39
- NLOHMANN_JSON_NAMESPACE_END