Skip to content

Commit

Permalink
Revert "used consteval instead of constexpr"
Browse files Browse the repository at this point in the history
This reverts commit 88e4ebe.
  • Loading branch information
silverqx committed Apr 15, 2023
1 parent 45b54f0 commit 3410580
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. */
consteval static RelationStoreType initStoreType();
constexpr 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>
consteval typename
constexpr 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. */
consteval static bool extendsSoftDeletes();
constexpr 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>
consteval bool Model<Derived, AllRelations...>::extendsSoftDeletes()
constexpr 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. */
consteval static bool isCustomPivot();
constexpr static bool isCustomPivot();

protected:
/* AsPivot */
Expand Down Expand Up @@ -297,7 +297,7 @@ namespace Orm::Tiny::Relations
}

template<typename PivotModel>
consteval bool BasePivot<PivotModel>::isCustomPivot()
constexpr 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. */
consteval static bool extendsSoftDeletes() noexcept;
constexpr static bool extendsSoftDeletes() noexcept;

protected:
/*! Alias for the Expression. */
Expand Down Expand Up @@ -1194,7 +1194,7 @@ namespace Orm::Tiny
}

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

0 comments on commit 3410580

Please sign in to comment.