aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2024-01-11 14:49:03 +0100
committerGitHub <noreply@github.com>2024-01-11 14:49:03 +0100
commit2e180154bd6a38b90a128ba0463d0dd2706a5ccf (patch)
tree0e0890fa08e63af33c52c9b6eacee56d037a740b /library/cpp
parent4366d88bef9360d9754e77eaa1f4a25d046a9cbd (diff)
downloadydb-2e180154bd6a38b90a128ba0463d0dd2706a5ccf.tar.gz
Library import 7 (#937)
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/http/server/http_ut.cpp3
-rw-r--r--library/cpp/lwtrace/protos/lwtrace.proto2
-rw-r--r--library/cpp/unified_agent_client/proto/unified_agent.proto2
-rw-r--r--library/cpp/yt/misc/strong_typedef-inl.h8
-rw-r--r--library/cpp/yt/misc/unittests/strong_typedef_ut.cpp64
-rw-r--r--library/cpp/yt/misc/unittests/ya.make1
6 files changed, 75 insertions, 5 deletions
diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp
index 191a6428ef1..0fc44fa5983 100644
--- a/library/cpp/http/server/http_ut.cpp
+++ b/library/cpp/http/server/http_ut.cpp
@@ -339,9 +339,6 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
}
Y_UNIT_TEST(TestReusePortEnabled) {
- if (!IsReusePortAvailable()) {
- return; // skip test
- }
TString res = TestData();
TPortManager pm;
const ui16 port = pm.GetPort();
diff --git a/library/cpp/lwtrace/protos/lwtrace.proto b/library/cpp/lwtrace/protos/lwtrace.proto
index 4702f56c0aa..00510957197 100644
--- a/library/cpp/lwtrace/protos/lwtrace.proto
+++ b/library/cpp/lwtrace/protos/lwtrace.proto
@@ -5,7 +5,7 @@ syntax = "proto3";
package NLWTrace;
-option go_package = "github.com/ydb-platform/ydb/library/cpp/lwtrace/protos";
+option go_package = "a.yandex-team.ru/library/cpp/lwtrace/protos";
message TProbeDesc {
string Name = 1; // Use either name+provider
diff --git a/library/cpp/unified_agent_client/proto/unified_agent.proto b/library/cpp/unified_agent_client/proto/unified_agent.proto
index 9a507afa062..68efe357476 100644
--- a/library/cpp/unified_agent_client/proto/unified_agent.proto
+++ b/library/cpp/unified_agent_client/proto/unified_agent.proto
@@ -4,7 +4,7 @@ import "google/protobuf/descriptor.proto";
package NUnifiedAgentProto;
option java_package = "com.yandex.unified_agent";
-option go_package = "github.com/ydb-platform/ydb/library/cpp/unified_agent_client/proto;unifiedagent";
+option go_package = "a.yandex-team.ru/library/cpp/unified_agent_client/proto;unifiedagent";
extend google.protobuf.FileOptions {
bool GenerateYaStyle = 66777;
diff --git a/library/cpp/yt/misc/strong_typedef-inl.h b/library/cpp/yt/misc/strong_typedef-inl.h
index 0a8a9751f0d..09b814b62cc 100644
--- a/library/cpp/yt/misc/strong_typedef-inl.h
+++ b/library/cpp/yt/misc/strong_typedef-inl.h
@@ -167,6 +167,14 @@ struct hash<NYT::TStrongTypedef<T, TTag>>
////////////////////////////////////////////////////////////////////////////////
+template <class T, class TTag>
+ requires std::numeric_limits<T>::is_specialized
+class numeric_limits<NYT::TStrongTypedef<T, TTag>>
+ : public numeric_limits<T>
+{ };
+
+////////////////////////////////////////////////////////////////////////////////
+
} // namespace std
////////////////////////////////////////////////////////////////////////////////
diff --git a/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp b/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp
new file mode 100644
index 00000000000..bc9321bb3c1
--- /dev/null
+++ b/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp
@@ -0,0 +1,64 @@
+#include <library/cpp/yt/misc/strong_typedef.h>
+
+#include <limits>
+
+namespace NYT {
+namespace {
+
+////////////////////////////////////////////////////////////////////////////////
+
+YT_DEFINE_STRONG_TYPEDEF(TMyInt1, int);
+YT_DEFINE_STRONG_TYPEDEF(TMyInt2, TMyInt1);
+
+static_assert(std::numeric_limits<TMyInt1>::is_specialized);
+static_assert(std::numeric_limits<TMyInt2>::is_specialized);
+
+#define XX(name) \
+ static_assert(std::numeric_limits<TMyInt1>::name == std::numeric_limits<int>::name); \
+ static_assert(std::numeric_limits<TMyInt2>::name == std::numeric_limits<int>::name);
+
+XX(is_signed)
+XX(digits)
+XX(digits10)
+XX(max_digits10)
+XX(is_integer)
+XX(is_exact)
+XX(radix)
+XX(min_exponent)
+XX(min_exponent10)
+XX(max_exponent)
+XX(max_exponent10)
+XX(has_infinity)
+XX(has_quiet_NaN)
+XX(has_signaling_NaN)
+XX(has_denorm)
+XX(has_denorm_loss)
+XX(is_iec559)
+XX(is_bounded)
+XX(is_modulo)
+XX(traps)
+XX(tinyness_before)
+XX(round_style)
+
+#undef XX
+
+#define XX(name) \
+ static_assert(std::numeric_limits<TMyInt1>::name() == std::numeric_limits<int>::name()); \
+ static_assert(std::numeric_limits<TMyInt2>::name() == std::numeric_limits<int>::name());
+
+XX(min)
+XX(max)
+XX(lowest)
+XX(epsilon)
+XX(round_error)
+XX(infinity)
+XX(quiet_NaN)
+XX(signaling_NaN)
+XX(denorm_min)
+
+#undef XX
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace
+} // namespace NYT
diff --git a/library/cpp/yt/misc/unittests/ya.make b/library/cpp/yt/misc/unittests/ya.make
index bc985812eda..611edd72173 100644
--- a/library/cpp/yt/misc/unittests/ya.make
+++ b/library/cpp/yt/misc/unittests/ya.make
@@ -6,6 +6,7 @@ SRCS(
enum_ut.cpp
guid_ut.cpp
preprocessor_ut.cpp
+ strong_typedef_ut.cpp
)
PEERDIR(