diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
commit | fc7be18c76af2e700641f3598c4856baeef1428e (patch) | |
tree | 11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /library/cpp/yt/misc/source_location-inl.h | |
parent | ec0e7ed6da6fb317741fd8468602949a1362eca5 (diff) | |
parent | c92cb9d3a19331916f0c274d80e67f02a62caa9b (diff) | |
download | ydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz |
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'library/cpp/yt/misc/source_location-inl.h')
-rw-r--r-- | library/cpp/yt/misc/source_location-inl.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/source_location-inl.h b/library/cpp/yt/misc/source_location-inl.h new file mode 100644 index 0000000000..9948260874 --- /dev/null +++ b/library/cpp/yt/misc/source_location-inl.h @@ -0,0 +1,25 @@ +#ifndef SOURCE_LOCATION_INL_H_ +#error "Direct inclusion of this file is not allowed, include source_location.h" +// For the sake of sane code completion. +#include "source_location.h" +#endif + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + +inline TSourceLocation::TSourceLocation(const char* fileName, int line) + : FileName_(fileName) + , Line_(line) +{ } + +#ifdef __cpp_lib_source_location +inline TSourceLocation::TSourceLocation(const std::source_location& location) + : FileName_(location.file_name()) + , Line_(location.line()) +{ } +#endif // __cpp_lib_source_location + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace std |