Skip to content

Commit

Permalink
[utility] strongly typed named values
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Jan 20, 2025
1 parent 691ed81 commit cb85851
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/fcarouge/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ inline constexpr Arithmetic identity<Arithmetic>{1};

template <typename Type>
requires requires { Type::Identity(); }
inline auto identity<Type>{Type::Identity()};
inline Type identity<Type>{Type::Identity()};

template <typename Type>
requires requires { Type::identity(); }
inline auto identity<Type>{Type::identity()};
inline Type identity<Type>{Type::identity()};

//! @brief The zero matrix.
//!
Expand All @@ -272,11 +272,11 @@ inline constexpr Arithmetic zero<Arithmetic>{0};

template <typename Type>
requires requires { Type::Zero(); }
inline auto zero<Type>{Type::Zero()};
inline Type zero<Type>{Type::Zero()};

template <typename Type>
requires requires { Type::zero(); }
inline auto zero<Type>{Type::zero()};
inline Type zero<Type>{Type::zero()};

//! @}

Expand Down

0 comments on commit cb85851

Please sign in to comment.