diff options
author | Ilnur Khuziev <ilnur.khuziev@yandex.ru> | 2022-02-10 16:46:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:13 +0300 |
commit | 736dcd8ca259457a136f2f9f9168c44643914323 (patch) | |
tree | ddd46a036d68bfa83aa11b892f31243ea6b068a1 /library/cpp/yson/node/node.h | |
parent | 9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff) | |
download | ydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz |
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yson/node/node.h')
-rw-r--r-- | library/cpp/yson/node/node.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/yson/node/node.h b/library/cpp/yson/node/node.h index 5f90f95df0..c06d8e6070 100644 --- a/library/cpp/yson/node/node.h +++ b/library/cpp/yson/node/node.h @@ -79,21 +79,21 @@ public: TNode(TString s); TNode(int i); - //this case made speccially for prevent mess cast of EType into TNode through TNode(int) constructor + //this case made speccially for prevent mess cast of EType into TNode through TNode(int) constructor //usual case of error SomeNode == TNode::Undefined <-- SomeNode indeed will be compared with TNode(0) without this method //correct way is SomeNode.GetType() == TNode::Undefined - template<class T = EType> - Y_FORCE_INLINE TNode(EType) - { - static_assert(!std::is_same<T, EType>::value, "looks like a mistake, may be you forget .GetType()"); - } - - //this case made speccially for prevent mess cast of T* into TNode through implicit bool ctr - template<class T = int> - Y_FORCE_INLINE TNode(const T*) : TNode() { - static_assert(!std::is_same<T,T>::value, "looks like a mistake, and pointer have converted to bool"); - } - + template<class T = EType> + Y_FORCE_INLINE TNode(EType) + { + static_assert(!std::is_same<T, EType>::value, "looks like a mistake, may be you forget .GetType()"); + } + + //this case made speccially for prevent mess cast of T* into TNode through implicit bool ctr + template<class T = int> + Y_FORCE_INLINE TNode(const T*) : TNode() { + static_assert(!std::is_same<T,T>::value, "looks like a mistake, and pointer have converted to bool"); + } + TNode(unsigned int ui); TNode(long i); TNode(unsigned long ui); |