Skip to content

Commit b3c10cb

Browse files
committed
trivial concept
1 parent e96b01c commit b3c10cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rpp/utility.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ concept Move_Constructable = __is_constructible(T, T);
513513
template<typename T>
514514
concept Copy_Constructable = __is_constructible(T, const T&);
515515

516+
template<typename T>
517+
concept Trivially_Constructable = __is_trivially_constructible(T);
518+
516519
template<typename T>
517520
concept Trivially_Copyable = __is_trivially_copyable(T);
518521

@@ -526,7 +529,8 @@ template<typename T>
526529
concept Must_Destruct = !__is_trivially_destructible(T);
527530

528531
template<typename T>
529-
concept Trivial = __is_trivially_constructible(T) && __is_trivially_copyable(T);
532+
concept Trivial = Trivially_Constructable<T> && Trivially_Copyable<T> && Trivially_Movable<T> &&
533+
Trivially_Destructible<T>;
530534

531535
template<typename E>
532536
using Underlying = __underlying_type(E);

0 commit comments

Comments
 (0)