Skip to content

Commit

Permalink
Fix possible chrono type mismatch when infra uses C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Nov 8, 2024
1 parent c5d10f2 commit aed706a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/infra/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ template <typename DbConnectionType>
class Transaction
{
public:
Transaction(Transaction&&) = default;
Transaction(const Transaction&) = delete;
Transaction(Transaction&&) = default;
Transaction(const Transaction&) = delete;
Transaction& operator=(const Transaction&) = delete;

Transaction(DbConnectionType& db)
Expand Down Expand Up @@ -161,7 +161,7 @@ inline auto optional_insert_value(const std::optional<bool>& opt)
}
}

inline auto optional_insert_value(const std::optional<chrono::date_point>& opt)
inline auto optional_insert_value(const std::optional<sqlpp::chrono::day_point>& opt)
{
if (opt.has_value()) {
return sqlpp::value_or_null(opt.value());
Expand All @@ -170,7 +170,7 @@ inline auto optional_insert_value(const std::optional<chrono::date_point>& opt)
}
}

inline auto optional_insert_value(const std::optional<chrono::time_point>& opt)
inline auto optional_insert_value(const std::optional<sqlpp::chrono::microsecond_point>& opt)
{
if (opt.has_value()) {
return sqlpp::value_or_null(opt.value());
Expand Down

0 comments on commit aed706a

Please sign in to comment.