AuROXTL/Include/auROXTL/Utility/auIsPointer.hpp

40 lines
736 B
C++

/***
Copyright (C) 2022-2024 Jamie Reece Wilson (a/k/a "Reece"). All rights reserved.
File: auIsPointer.hpp
File: auTemplateMeta.hpp
Date: 2024-11-30
Date: 2022-04-01
Author: Reece
***/
#pragma once
template<class T>
struct AuIsPointer : AuFalseType
{ };
template<class T>
struct AuIsPointer<T *> : AuTrueType
{ };
template<class T>
struct AuIsPointer<T *const> : AuTrueType
{ };
template<class T>
struct AuIsPointer<T *volatile> : AuTrueType
{ };
template<class T>
struct AuIsPointer<T *const volatile> : AuTrueType
{ };
#if defined(AU_LANG_CPP_14_)
template <class T>
AUROXTL_CONSTEXPR_14 bool AuIsPointer_v = AuIsPointer<T>::kValue;
#endif
#define AuIsPointer_mv(T) (AuIsPointer<T>::kValue)