@@ -28,6 +28,7 @@ SOFTWARE.
2828
2929#include < array>
3030
31+ #include < utki/config.hpp>
3132#include < utki/debug.hpp>
3233#include < utki/math.hpp>
3334
@@ -674,7 +675,10 @@ class vector :
674675 * @param num - scalar to multiply by.
675676 * @return Reference to this vector object.
676677 */
677- constexpr vector& operator *=(component_type num) noexcept
678+ #if CFG_CPP >= 20
679+ constexpr
680+ #endif
681+ vector& operator *=(component_type num) noexcept
678682 {
679683 return this ->comp_operation ([&num](auto & a) {
680684 return a * num;
@@ -687,7 +691,10 @@ class vector :
687691 * @param num - scalar to multiply by.
688692 * @return Vector resulting from multiplication of this vector by scalar.
689693 */
690- constexpr vector operator *(component_type num) const noexcept
694+ #if CFG_CPP >= 20
695+ constexpr
696+ #endif
697+ vector operator *(component_type num) const noexcept
691698 {
692699 return (vector (*this ) *= num);
693700 }
@@ -698,7 +705,10 @@ class vector :
698705 * @param num - scalar to divide by.
699706 * @return Vector resulting from division of this vector by scalar.
700707 */
701- constexpr vector operator /(component_type num) const noexcept
708+ #if CFG_CPP >= 20
709+ constexpr
710+ #endif
711+ vector operator /(component_type num) const noexcept
702712 {
703713 return vector (*this ) /= num;
704714 }
@@ -720,7 +730,10 @@ class vector :
720730 * @param num - scalar to divide by.
721731 * @return Reference to this vector object.
722732 */
723- constexpr vector& operator /=(component_type num) noexcept
733+ #if CFG_CPP >= 20
734+ constexpr
735+ #endif
736+ vector& operator /=(component_type num) noexcept
724737 {
725738 // TODO: uncomment when there is a solution to have the assertion in constexpr context
726739 // utki::assert(num != 0, [&](auto& o) {
0 commit comments