Skip to content

Commit

Permalink
used consteval instead of constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Apr 15, 2023
1 parent 185be84 commit 88e4ebe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/orm/tiny/concerns/hasrelationstore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -653,7 +653,7 @@ namespace Orm::Tiny::Concerns

template<typename Derived, AllRelationsConcept ...AllRelations>
template<typename Related>
constexpr typename
consteval typename
HasRelationStore<Derived, AllRelations...>::RelationStoreType
HasRelationStore<Derived, AllRelations...>::QueriesRelationshipsStore<Related>
::initStoreType()
Expand Down
4 changes: 2 additions & 2 deletions include/orm/tiny/model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -1390,7 +1390,7 @@ namespace Orm::Tiny
}

template<typename Derived, AllRelationsConcept ...AllRelations>
constexpr bool Model<Derived, AllRelations...>::extendsSoftDeletes()
consteval bool Model<Derived, AllRelations...>::extendsSoftDeletes()
{
return std::is_base_of_v<SoftDeletes<Derived>, Derived>;
}
Expand Down
4 changes: 2 additions & 2 deletions include/orm/tiny/relations/basepivot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -297,7 +297,7 @@ namespace Orm::Tiny::Relations
}

template<typename PivotModel>
constexpr bool BasePivot<PivotModel>::isCustomPivot()
consteval bool BasePivot<PivotModel>::isCustomPivot()
{
return !std::is_same_v<PivotModel, Relations::Pivot>;
}
Expand Down
4 changes: 2 additions & 2 deletions include/orm/tiny/tinybuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ namespace Orm::Tiny
/*! Apply the SoftDeletes where null condition for the deleted_at column. */
Builder<Model> &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. */
Expand Down Expand Up @@ -1194,7 +1194,7 @@ namespace Orm::Tiny
}

template<typename Model>
constexpr bool Builder<Model>::extendsSoftDeletes() noexcept
consteval bool Builder<Model>::extendsSoftDeletes() noexcept
{
return m_extendsSoftDeletes;
}
Expand Down

0 comments on commit 88e4ebe

Please sign in to comment.