MCPcopy Create free account
hub / github.com/catboost/catboost / TStaticBuf

Class TStaticBuf

util/system/src_root.h:9–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8namespace NPrivate {
9 struct TStaticBuf {
10 constexpr TStaticBuf(const char* data, unsigned len) noexcept
11 : Data(data)
12 , Len(len)
13 {
14 }
15
16 template <class T>
17 constexpr T As() const noexcept {
18 return T(Data, Len);
19 }
20
21 template <class T>
22 constexpr operator T() const noexcept {
23 return this->As<T>();
24 }
25
26 const char* Data;
27 unsigned Len;
28 };
29
30#define STATIC_BUF(x) ::NPrivate::TStaticBuf(x, sizeof(x) - 1)
31

Callers 3

AssertTrapImplFunction · 0.85
StripRootFunction · 0.85
TStaticBuf StripRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected