aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/binsaver/bin_saver.h
diff options
context:
space:
mode:
authorspreis <spreis@yandex-team.ru>2022-02-10 16:47:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:13 +0300
commitbcd1126cbd5d445cd0665d295198aa39c6ab8cbe (patch)
treed41d29a041d5733ef148335290dbb817b197d4cd /library/cpp/binsaver/bin_saver.h
parent986cb5d624f352524bfa0c42c9a7695235cdaa41 (diff)
downloadydb-bcd1126cbd5d445cd0665d295198aa39c6ab8cbe.tar.gz
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/binsaver/bin_saver.h')
-rw-r--r--library/cpp/binsaver/bin_saver.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h
index 412424889f..69da5ad127 100644
--- a/library/cpp/binsaver/bin_saver.h
+++ b/library/cpp/binsaver/bin_saver.h
@@ -30,18 +30,18 @@ enum ESaverMode {
SAVER_MODE_WRITE_COMPRESSED = 3,
};
-namespace NBinSaverInternals {
- // This lets explicitly control the overload resolution priority
- // The higher P means higher priority in overload resolution order
- template <int P>
- struct TOverloadPriority : TOverloadPriority <P-1> {
- };
-
- template <>
- struct TOverloadPriority<0> {
- };
-}
-
+namespace NBinSaverInternals {
+ // This lets explicitly control the overload resolution priority
+ // The higher P means higher priority in overload resolution order
+ template <int P>
+ struct TOverloadPriority : TOverloadPriority <P-1> {
+ };
+
+ template <>
+ struct TOverloadPriority<0> {
+ };
+}
+
//////////////////////////////////////////////////////////////////////////
struct IBinSaver {
public:
@@ -63,18 +63,18 @@ private:
// }
// };
template <class T, typename = decltype(std::declval<T*>()->T::operator&(std::declval<IBinSaver&>()))>
- void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<2>) { // highest priority - will be resolved first if enabled
+ void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<2>) { // highest priority - will be resolved first if enabled
// Note: p->operator &(*this) would lead to infinite recursion
p->T::operator&(*this);
}
template <class T, typename = decltype(std::declval<T&>() & std::declval<IBinSaver&>())>
- void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<1>) { // lower priority - will be resolved second if enabled
+ void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<1>) { // lower priority - will be resolved second if enabled
(*p) & (*this);
}
template <class T>
- void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<0>) { // lower priority - will be resolved last
+ void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<0>) { // lower priority - will be resolved last
#if (!defined(_MSC_VER))
// In MSVC __has_trivial_copy returns false to enums, primitive types and arrays.
static_assert(__has_trivial_copy(T), "Class is nontrivial copyable, you must define operator&, see");
@@ -294,7 +294,7 @@ public:
// return type of Add() is used to detect specialized serializer (see HasNonTrivialSerializer below)
template <class T>
char Add(const chunk_id, T* p) {
- CallObjectSerialize(p, NBinSaverInternals::TOverloadPriority<2>());
+ CallObjectSerialize(p, NBinSaverInternals::TOverloadPriority<2>());
return 0;
}
int Add(const chunk_id, std::string* pStr) {