From 88e4ebe6a41c4e323a74656607a200c172bfc40b Mon Sep 17 00:00:00 2001 From: silverqx Date: Sat, 15 Apr 2023 14:22:51 +0200 Subject: [PATCH] used consteval instead of constexpr --- include/orm/tiny/concerns/hasrelationstore.hpp | 4 ++-- include/orm/tiny/model.hpp | 4 ++-- include/orm/tiny/relations/basepivot.hpp | 4 ++-- include/orm/tiny/tinybuilder.hpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/orm/tiny/concerns/hasrelationstore.hpp b/include/orm/tiny/concerns/hasrelationstore.hpp index 38621275a..d83017772 100644 --- a/include/orm/tiny/concerns/hasrelationstore.hpp +++ b/include/orm/tiny/concerns/hasrelationstore.hpp @@ -258,7 +258,7 @@ namespace Orm::Tiny::Concerns protected: /*! Store type initializer. */ - constexpr static RelationStoreType initStoreType(); + consteval static RelationStoreType initStoreType(); /*! Served store type, this class can handle two store types. */ T_THREAD_LOCAL @@ -653,7 +653,7 @@ namespace Orm::Tiny::Concerns template template - constexpr typename + consteval typename HasRelationStore::RelationStoreType HasRelationStore::QueriesRelationshipsStore ::initStoreType() diff --git a/include/orm/tiny/model.hpp b/include/orm/tiny/model.hpp index 032ad3e27..5ad8ec312 100644 --- a/include/orm/tiny/model.hpp +++ b/include/orm/tiny/model.hpp @@ -291,7 +291,7 @@ namespace Orm::Tiny /*! Qualify the given column name by the model's table. */ QString qualifyColumn(const QString &column) const; /*! Determina whether the Derived Model extends the SoftDeletes. */ - constexpr static bool extendsSoftDeletes(); + consteval static bool extendsSoftDeletes(); /* Data members */ /*! Indicates if the model exists. */ @@ -1390,7 +1390,7 @@ namespace Orm::Tiny } template - constexpr bool Model::extendsSoftDeletes() + consteval bool Model::extendsSoftDeletes() { return std::is_base_of_v, Derived>; } diff --git a/include/orm/tiny/relations/basepivot.hpp b/include/orm/tiny/relations/basepivot.hpp index 9e2c6b6fd..e115cd13c 100644 --- a/include/orm/tiny/relations/basepivot.hpp +++ b/include/orm/tiny/relations/basepivot.hpp @@ -77,7 +77,7 @@ namespace Orm::Tiny::Relations PivotModel &setPivotKeys(const QString &foreignKey, const QString &relatedKey); /*! Determine whether the PivotType is a custom pivot. */ - constexpr static bool isCustomPivot(); + consteval static bool isCustomPivot(); protected: /* AsPivot */ @@ -297,7 +297,7 @@ namespace Orm::Tiny::Relations } template - constexpr bool BasePivot::isCustomPivot() + consteval bool BasePivot::isCustomPivot() { return !std::is_same_v; } diff --git a/include/orm/tiny/tinybuilder.hpp b/include/orm/tiny/tinybuilder.hpp index 057346b1a..571b18baf 100644 --- a/include/orm/tiny/tinybuilder.hpp +++ b/include/orm/tiny/tinybuilder.hpp @@ -270,7 +270,7 @@ namespace Orm::Tiny /*! Apply the SoftDeletes where null condition for the deleted_at column. */ Builder &applySoftDeletes(); /*! Determine whether the Model the TinyBuilder manages extends SoftDeletes. */ - constexpr static bool extendsSoftDeletes() noexcept; + consteval static bool extendsSoftDeletes() noexcept; protected: /*! Alias for the Expression. */ @@ -1194,7 +1194,7 @@ namespace Orm::Tiny } template - constexpr bool Builder::extendsSoftDeletes() noexcept + consteval bool Builder::extendsSoftDeletes() noexcept { return m_extendsSoftDeletes; }