mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
AK: Make AK::IsSame<T, U>::value a constexpr bool
It being an enum value was preventing it from being used without `!!` in requires clauses (bool also makes more sense anyway).
This commit is contained in:
parent
a9184fcb76
commit
ad646420dd
1 changed files with 2 additions and 6 deletions
|
@ -276,16 +276,12 @@ struct RemovePointer<T* const volatile> {
|
||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
struct IsSame {
|
struct IsSame {
|
||||||
enum {
|
static constexpr bool value = false;
|
||||||
value = 0
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct IsSame<T, T> {
|
struct IsSame<T, T> {
|
||||||
enum {
|
static constexpr bool value = true;
|
||||||
value = 1
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<bool condition, class TrueType, class FalseType>
|
template<bool condition, class TrueType, class FalseType>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue