mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
Add is_(un)signed to compat.h, with specializations for the Tracker classes.
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@6577 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0ece42110c
commit
ee298f18b8
2 changed files with 21 additions and 0 deletions
|
@ -687,6 +687,16 @@ void eduke32_exit_return(int) ATTRIBUTE((noreturn));
|
|||
|
||||
# if CXXSTD >= 2011 || EDUKE32_MSVC_PREREQ(1800)
|
||||
using std::is_integral;
|
||||
template <typename T>
|
||||
struct is_signed
|
||||
{
|
||||
static constexpr bool value = std::is_signed<T>::value;
|
||||
};
|
||||
template <typename T>
|
||||
struct is_unsigned
|
||||
{
|
||||
static constexpr bool value = std::is_unsigned<T>::value;
|
||||
};
|
||||
# endif
|
||||
|
||||
# if CXXSTD >= 2014
|
||||
|
|
|
@ -90,3 +90,14 @@ inline TrackedType TRACKER_NAME_<TrackedType>::cast() const
|
|||
{
|
||||
return this->TrackedValue;
|
||||
}
|
||||
|
||||
template <typename TrackedType>
|
||||
struct is_signed<TRACKER_NAME_<TrackedType>>
|
||||
{
|
||||
static constexpr bool value = std::is_signed<TrackedType>::value;
|
||||
};
|
||||
template <typename TrackedType>
|
||||
struct is_unsigned<TRACKER_NAME_<TrackedType>>
|
||||
{
|
||||
static constexpr bool value = std::is_unsigned<TrackedType>::value;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue