#include "Stroika/Foundation/StroikaPreComp.h"
#include <bit>
#include <cmath>
#include <compare>
#include <cstdarg>
#include <ranges>
#include "StdCompat.inl"
Go to the source code of this file.
Namespaces | |
namespace | Stroika::Foundation |
namespace | Stroika::Foundation::Common |
Functions | |
template<class To , class From > requires (sizeof (To) == sizeof (From) && std::is_trivially_copyable_v<From> && std::is_trivially_copyable_v<To>) | |
To | Stroika::Foundation::Common::StdCompat::bit_cast (const From &src) noexcept |
template<class T > | |
T | Stroika::Foundation::Common::StdCompat::byteswap (T n) noexcept |
template<typename T > | |
constexpr bool | Stroika::Foundation::Common::StdCompat::isinf (T v) noexcept |
template<typename T > | |
constexpr bool | Stroika::Foundation::Common::StdCompat::isnan (T v) noexcept |
The purpose of this module is to define any std c++ functions/classes etc - which may not be provided by the current std c++ library (often because not compiled with appropriate –std=... flag) - and/or because its an old compiler.
This doesn't strictly violate any rules about sticking stuff into namespace std - cuz we don't. That's why we use a separate namespace (that often just indirects to the namespace std - where the function/class is defined already).
Definition in file StdCompat.h.
|
noexcept |
Workaround absence of bit_cast in MacOS XCode 14 (which we support with Stroika v3)
Definition at line 106 of file StdCompat.h.
|
noexcept |
Workaround absence of byteswap gcc up to version 12, and clang (up to 14).
Definition at line 124 of file StdCompat.h.
|
constexprnoexcept |
workaround qCompilerAndStdLib_fpclasifyEtcOfInteger_Buggy
Definition at line 147 of file StdCompat.h.
|
constexprnoexcept |
workaround qCompilerAndStdLib_fpclasifyEtcOfInteger_Buggy
Definition at line 168 of file StdCompat.h.