mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
AK: Add is_trivial and is_trivially_copyable
This commit is contained in:
parent
91bcad7cce
commit
bb92eab9ce
Notes:
sideshowbarker
2024-07-19 02:06:10 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/bb92eab9ce7 Pull-request: https://github.com/SerenityOS/serenity/pull/3651 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bugaevc
1 changed files with 14 additions and 0 deletions
|
@ -452,6 +452,18 @@ template<typename Base, typename Derived>
|
|||
struct IsBaseOf : public IntegralConstant<bool, __is_base_of(Base, Derived)> {
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
constexpr bool is_trivial()
|
||||
{
|
||||
return __is_trivial(T);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr bool is_trivially_copyable()
|
||||
{
|
||||
return __is_trivially_copyable(T);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct __IsIntegral : FalseType {
|
||||
};
|
||||
|
@ -502,6 +514,8 @@ using AK::Conditional;
|
|||
using AK::declval;
|
||||
using AK::exchange;
|
||||
using AK::forward;
|
||||
using AK::is_trivial;
|
||||
using AK::is_trivially_copyable;
|
||||
using AK::IsBaseOf;
|
||||
using AK::IsClass;
|
||||
using AK::IsConst;
|
||||
|
|
Loading…
Add table
Reference in a new issue