bux API Reference 1.11.0
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Loading...
Searching...
No Matches
XPlatform.h
Go to the documentation of this file.
1#pragma once
2#include <chrono> // std::chrono::time_zone, std::chrono::get_tzdb()
3
4#if defined(_MSC_VER)
5# define CUR_FUNC_ __FUNCTION__
6//# define CUR_FUNC_ __FUNCSIG__
7#elif defined(__BORLANDC__)
8# define CUR_FUNC_ __FUNC__
9#elif defined(__GNUC__)
10# define CUR_FUNC_ __PRETTY_FUNCTION__
11#else
12# define CUR_FUNC_ "?func?"
13#endif
14
15namespace bux {
16
17#ifndef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE
18using T_LocalZone = const std::chrono::time_zone *;
19inline T_LocalZone local_zone() { return std::chrono::get_tzdb().current_zone(); }
20#define LOCALZONE_IS_TIMEZONE (1)
21#else
22using T_LocalZone = bool;
23consteval bool local_zone() { return true; }
24#define LOCALZONE_IS_TIMEZONE (0)
25#endif
26
27} // namespace bux
THE common namespace of bux library.
Definition AtomiX.cpp:3
const std::chrono::time_zone * T_LocalZone
Definition XPlatform.h:18
T_LocalZone local_zone()
Definition XPlatform.h:19