forked from OctaForge/libostd
type renames
parent
6eae6487c4
commit
d4e234f893
|
@ -591,8 +591,8 @@ namespace detail {
|
|||
|
||||
template<typename R, typename ...Args>
|
||||
struct Function<R(Args...)>: octa::detail::FunctionBase<R, Args...> {
|
||||
Function( ) { init_empty(); }
|
||||
Function(nullptr_t) { init_empty(); }
|
||||
Function( ) { init_empty(); }
|
||||
Function(Nullptr) { init_empty(); }
|
||||
|
||||
Function(Function &&f) {
|
||||
init_empty();
|
||||
|
@ -619,7 +619,7 @@ struct Function<R(Args...)>: octa::detail::FunctionBase<R, Args...> {
|
|||
Function(octa::AllocatorArg, const A &) { init_empty(); }
|
||||
|
||||
template<typename A>
|
||||
Function(octa::AllocatorArg, const A &, nullptr_t) { init_empty(); }
|
||||
Function(octa::AllocatorArg, const A &, Nullptr) { init_empty(); }
|
||||
|
||||
template<typename A>
|
||||
Function(octa::AllocatorArg, const A &, Function &&f) {
|
||||
|
@ -739,16 +739,16 @@ private:
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
bool operator==(nullptr_t, const Function<T> &rhs) { return !rhs; }
|
||||
bool operator==(Nullptr, const Function<T> &rhs) { return !rhs; }
|
||||
|
||||
template<typename T>
|
||||
bool operator==(const Function<T> &lhs, nullptr_t) { return !lhs; }
|
||||
bool operator==(const Function<T> &lhs, Nullptr) { return !lhs; }
|
||||
|
||||
template<typename T>
|
||||
bool operator!=(nullptr_t, const Function<T> &rhs) { return rhs; }
|
||||
bool operator!=(Nullptr, const Function<T> &rhs) { return rhs; }
|
||||
|
||||
template<typename T>
|
||||
bool operator!=(const Function<T> &lhs, nullptr_t) { return lhs; }
|
||||
bool operator!=(const Function<T> &lhs, Nullptr) { return lhs; }
|
||||
|
||||
namespace detail {
|
||||
template<typename F>
|
||||
|
|
|
@ -284,7 +284,7 @@ public:
|
|||
static_assert(!octa::IsPointer<D>::value,
|
||||
"Box constructed with null fptr deleter");
|
||||
}
|
||||
constexpr Box(nullptr_t): p_stor(nullptr, D()) {
|
||||
constexpr Box(Nullptr): p_stor(nullptr, D()) {
|
||||
static_assert(!octa::IsPointer<D>::value,
|
||||
"Box constructed with null fptr deleter");
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
Box &operator=(nullptr_t) {
|
||||
Box &operator=(Nullptr) {
|
||||
reset();
|
||||
return *this;
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ public:
|
|||
static_assert(!octa::IsPointer<D>::value,
|
||||
"Box constructed with null fptr deleter");
|
||||
}
|
||||
constexpr Box(nullptr_t): p_stor(nullptr, D()) {
|
||||
constexpr Box(Nullptr): p_stor(nullptr, D()) {
|
||||
static_assert(!octa::IsPointer<D>::value,
|
||||
"Box constructed with null fptr deleter");
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ public:
|
|||
> d, octa::EnableIf<octa::detail::SameOrLessCvQualified<U, Pointer>::value,
|
||||
Nat> = Nat()): p_stor(p, d) {}
|
||||
|
||||
Box(nullptr_t, octa::Conditional<octa::IsReference<D>::value,
|
||||
Box(Nullptr, octa::Conditional<octa::IsReference<D>::value,
|
||||
D, AddLvalueReference<const D>
|
||||
> d): p_stor(nullptr, d) {}
|
||||
|
||||
|
@ -433,7 +433,7 @@ public:
|
|||
"rvalue deleter cannot be a ref");
|
||||
}
|
||||
|
||||
Box(nullptr_t, octa::RemoveReference<D> &&d):
|
||||
Box(Nullptr, octa::RemoveReference<D> &&d):
|
||||
p_stor(nullptr, octa::move(d)) {
|
||||
static_assert(!octa::IsReference<D>::value,
|
||||
"rvalue deleter cannot be a ref");
|
||||
|
@ -468,7 +468,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
Box &operator=(nullptr_t) {
|
||||
Box &operator=(Nullptr) {
|
||||
reset();
|
||||
return *this;
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ public:
|
|||
if (tmp) p_stor.get_deleter()(tmp);
|
||||
}
|
||||
|
||||
void reset(nullptr_t) {
|
||||
void reset(Nullptr) {
|
||||
Pointer tmp = p_stor.p_ptr;
|
||||
p_stor.p_ptr = nullptr;
|
||||
if (tmp) p_stor.get_deleter()(tmp);
|
||||
|
|
|
@ -80,8 +80,8 @@ namespace detail {
|
|||
/* is null pointer */
|
||||
|
||||
namespace detail {
|
||||
template<typename> struct IsNullPointerBase : False {};
|
||||
template< > struct IsNullPointerBase<nullptr_t>: True {};
|
||||
template<typename> struct IsNullPointerBase : False {};
|
||||
template< > struct IsNullPointerBase<Nullptr>: True {};
|
||||
}
|
||||
|
||||
template<typename T> struct IsNullPointer:
|
||||
|
@ -1114,7 +1114,7 @@ namespace detail {
|
|||
template<size_t N> struct AlignedTest {
|
||||
union type {
|
||||
uchar data[N];
|
||||
octa::max_align_t align;
|
||||
octa::MaxAlign align;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ using llong = long long;
|
|||
|
||||
using ldouble = long double;
|
||||
|
||||
using nullptr_t = decltype(nullptr);
|
||||
using Nullptr = decltype(nullptr);
|
||||
|
||||
#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
|
||||
using ::max_align_t;
|
||||
using MaxAlign = ::max_align_t;
|
||||
#else
|
||||
using max_align_t = long double;
|
||||
using MaxAlign = long double;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue