Skip to content

Commit 0b931ad

Browse files
committed
Ydb stable 22-4-30
x-stable-origin-commit: a5971297427891237b5f05b5389146b6ca2fff93
1 parent e6c9b17 commit 0b931ad

File tree

265 files changed

+31246
-662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+31246
-662
lines changed
-1.69 KB
Binary file not shown.

contrib/restricted/CMakeLists.darwin.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ add_subdirectory(aws)
1212
add_subdirectory(boost)
1313
add_subdirectory(fast_float)
1414
add_subdirectory(googletest)
15+
add_subdirectory(nlohmann_json)
1516
add_subdirectory(thrift)
1617
add_subdirectory(uriparser)

contrib/restricted/CMakeLists.linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ add_subdirectory(cityhash-1.0.2)
1414
add_subdirectory(dragonbox)
1515
add_subdirectory(fast_float)
1616
add_subdirectory(googletest)
17+
add_subdirectory(nlohmann_json)
1718
add_subdirectory(thrift)
1819
add_subdirectory(uriparser)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
# This file was gererated by the build system used internally in the Yandex monorepo.
3+
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
4+
# like target_include_directories). These modifications will be ported to original
5+
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
6+
# original buildsystem will not be accepted.
7+
8+
9+
10+
add_library(contrib-restricted-nlohmann_json INTERFACE)
11+
target_include_directories(contrib-restricted-nlohmann_json INTERFACE
12+
${CMAKE_SOURCE_DIR}/contrib/restricted/nlohmann_json/include
13+
)
14+
target_link_libraries(contrib-restricted-nlohmann_json INTERFACE
15+
contrib-libs-cxxsupp
16+
)

contrib/restricted/nlohmann_json/ChangeLog.md

Lines changed: 2943 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2013-2022 Niels Lohmann
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

contrib/restricted/nlohmann_json/README.md

Lines changed: 1846 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// __ _____ _____ _____
2+
// __| | __| | | | JSON for Modern C++
3+
// | | |__ | | | | | | version 3.11.2
4+
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
5+
//
6+
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
7+
// SPDX-License-Identifier: MIT
8+
9+
#pragma once
10+
11+
#include <utility>
12+
13+
#include <nlohmann/detail/abi_macros.hpp>
14+
#include <nlohmann/detail/conversions/from_json.hpp>
15+
#include <nlohmann/detail/conversions/to_json.hpp>
16+
#include <nlohmann/detail/meta/identity_tag.hpp>
17+
18+
NLOHMANN_JSON_NAMESPACE_BEGIN
19+
20+
/// @sa https://json.nlohmann.me/api/adl_serializer/
21+
template<typename ValueType, typename>
22+
struct adl_serializer
23+
{
24+
/// @brief convert a JSON value to any value type
25+
/// @sa https://json.nlohmann.me/api/adl_serializer/from_json/
26+
template<typename BasicJsonType, typename TargetType = ValueType>
27+
static auto from_json(BasicJsonType && j, TargetType& val) noexcept(
28+
noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val)))
29+
-> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void())
30+
{
31+
::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
32+
}
33+
34+
/// @brief convert a JSON value to any value type
35+
/// @sa https://json.nlohmann.me/api/adl_serializer/from_json/
36+
template<typename BasicJsonType, typename TargetType = ValueType>
37+
static auto from_json(BasicJsonType && j) noexcept(
38+
noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})))
39+
-> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))
40+
{
41+
return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {});
42+
}
43+
44+
/// @brief convert any value type to a JSON value
45+
/// @sa https://json.nlohmann.me/api/adl_serializer/to_json/
46+
template<typename BasicJsonType, typename TargetType = ValueType>
47+
static auto to_json(BasicJsonType& j, TargetType && val) noexcept(
48+
noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val))))
49+
-> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void())
50+
{
51+
::nlohmann::to_json(j, std::forward<TargetType>(val));
52+
}
53+
};
54+
55+
NLOHMANN_JSON_NAMESPACE_END
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// __ _____ _____ _____
2+
// __| | __| | | | JSON for Modern C++
3+
// | | |__ | | | | | | version 3.11.2
4+
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
5+
//
6+
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
7+
// SPDX-License-Identifier: MIT
8+
9+
#pragma once
10+
11+
#include <cstdint> // uint8_t, uint64_t
12+
#include <tuple> // tie
13+
#include <utility> // move
14+
15+
#include <nlohmann/detail/abi_macros.hpp>
16+
17+
NLOHMANN_JSON_NAMESPACE_BEGIN
18+
19+
/// @brief an internal type for a backed binary type
20+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/
21+
template<typename BinaryType>
22+
class byte_container_with_subtype : public BinaryType
23+
{
24+
public:
25+
using container_type = BinaryType;
26+
using subtype_type = std::uint64_t;
27+
28+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/
29+
byte_container_with_subtype() noexcept(noexcept(container_type()))
30+
: container_type()
31+
{}
32+
33+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/
34+
byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b)))
35+
: container_type(b)
36+
{}
37+
38+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/
39+
byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b))))
40+
: container_type(std::move(b))
41+
{}
42+
43+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/
44+
byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b)))
45+
: container_type(b)
46+
, m_subtype(subtype_)
47+
, m_has_subtype(true)
48+
{}
49+
50+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/
51+
byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b))))
52+
: container_type(std::move(b))
53+
, m_subtype(subtype_)
54+
, m_has_subtype(true)
55+
{}
56+
57+
bool operator==(const byte_container_with_subtype& rhs) const
58+
{
59+
return std::tie(static_cast<const BinaryType&>(*this), m_subtype, m_has_subtype) ==
60+
std::tie(static_cast<const BinaryType&>(rhs), rhs.m_subtype, rhs.m_has_subtype);
61+
}
62+
63+
bool operator!=(const byte_container_with_subtype& rhs) const
64+
{
65+
return !(rhs == *this);
66+
}
67+
68+
/// @brief sets the binary subtype
69+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/
70+
void set_subtype(subtype_type subtype_) noexcept
71+
{
72+
m_subtype = subtype_;
73+
m_has_subtype = true;
74+
}
75+
76+
/// @brief return the binary subtype
77+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/
78+
constexpr subtype_type subtype() const noexcept
79+
{
80+
return m_has_subtype ? m_subtype : static_cast<subtype_type>(-1);
81+
}
82+
83+
/// @brief return whether the value has a subtype
84+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/
85+
constexpr bool has_subtype() const noexcept
86+
{
87+
return m_has_subtype;
88+
}
89+
90+
/// @brief clears the binary subtype
91+
/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/
92+
void clear_subtype() noexcept
93+
{
94+
m_subtype = 0;
95+
m_has_subtype = false;
96+
}
97+
98+
private:
99+
subtype_type m_subtype = 0;
100+
bool m_has_subtype = false;
101+
};
102+
103+
NLOHMANN_JSON_NAMESPACE_END
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// __ _____ _____ _____
2+
// __| | __| | | | JSON for Modern C++
3+
// | | |__ | | | | | | version 3.11.2
4+
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
5+
//
6+
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
7+
// SPDX-License-Identifier: MIT
8+
9+
#pragma once
10+
11+
// This file contains all macro definitions affecting or depending on the ABI
12+
13+
#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
14+
#if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
15+
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2
16+
#warning "Already included a different version of the library!"
17+
#endif
18+
#endif
19+
#endif
20+
21+
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
22+
#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
23+
#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum)
24+
25+
#ifndef JSON_DIAGNOSTICS
26+
#define JSON_DIAGNOSTICS 0
27+
#endif
28+
29+
#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
30+
#define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
31+
#endif
32+
33+
#if JSON_DIAGNOSTICS
34+
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
35+
#else
36+
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
37+
#endif
38+
39+
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
40+
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
41+
#else
42+
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
43+
#endif
44+
45+
#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
46+
#define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
47+
#endif
48+
49+
// Construct the namespace ABI tags component
50+
#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
51+
#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
52+
NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
53+
54+
#define NLOHMANN_JSON_ABI_TAGS \
55+
NLOHMANN_JSON_ABI_TAGS_CONCAT( \
56+
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
57+
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
58+
59+
// Construct the namespace version component
60+
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
61+
_v ## major ## _ ## minor ## _ ## patch
62+
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
63+
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
64+
65+
#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
66+
#define NLOHMANN_JSON_NAMESPACE_VERSION
67+
#else
68+
#define NLOHMANN_JSON_NAMESPACE_VERSION \
69+
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
70+
NLOHMANN_JSON_VERSION_MINOR, \
71+
NLOHMANN_JSON_VERSION_PATCH)
72+
#endif
73+
74+
// Combine namespace components
75+
#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
76+
#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
77+
NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
78+
79+
#ifndef NLOHMANN_JSON_NAMESPACE
80+
#define NLOHMANN_JSON_NAMESPACE \
81+
nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
82+
NLOHMANN_JSON_ABI_TAGS, \
83+
NLOHMANN_JSON_NAMESPACE_VERSION)
84+
#endif
85+
86+
#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
87+
#define NLOHMANN_JSON_NAMESPACE_BEGIN \
88+
namespace nlohmann \
89+
{ \
90+
inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
91+
NLOHMANN_JSON_ABI_TAGS, \
92+
NLOHMANN_JSON_NAMESPACE_VERSION) \
93+
{
94+
#endif
95+
96+
#ifndef NLOHMANN_JSON_NAMESPACE_END
97+
#define NLOHMANN_JSON_NAMESPACE_END \
98+
} /* namespace (inline namespace) NOLINT(readability/namespace) */ \
99+
} // namespace nlohmann
100+
#endif

0 commit comments

Comments
 (0)