@@ -96,7 +96,7 @@ inline void cxcm_constexpr_assert_failed(Assert &&a) noexcept
9696
9797constexpr inline int DSGA_MAJOR_VERSION = 1 ;
9898constexpr inline int DSGA_MINOR_VERSION = 3 ;
99- constexpr inline int DSGA_PATCH_VERSION = 11 ;
99+ constexpr inline int DSGA_PATCH_VERSION = 12 ;
100100
101101namespace dsga
102102{
@@ -111,7 +111,7 @@ namespace dsga
111111
112112 constexpr inline int CXCM_MAJOR_VERSION = 1 ;
113113 constexpr inline int CXCM_MINOR_VERSION = 1 ;
114- constexpr inline int CXCM_PATCH_VERSION = 0 ;
114+ constexpr inline int CXCM_PATCH_VERSION = 1 ;
115115
116116 namespace dd_real
117117 {
@@ -476,13 +476,13 @@ namespace dsga
476476
477477 // undefined behavior if value is std::numeric_limits<T>::min()
478478 template <std::signed_integral T>
479- constexpr double abs (T value) noexcept
479+ constexpr T abs (T value) noexcept
480480 {
481481 return (value < T (0 )) ? -value : value;
482482 }
483483
484484 template <std::unsigned_integral T>
485- constexpr double abs (T value) noexcept
485+ constexpr T abs (T value) noexcept
486486 {
487487 return value;
488488 }
@@ -1222,7 +1222,7 @@ namespace dsga
12221222 // don't know what to do if someone tries to negate the most negative number.
12231223 // standard says behavior is undefined if you can't represent the result by return type.
12241224 template <std::integral T>
1225- constexpr double abs (T value) noexcept
1225+ constexpr T abs (T value) noexcept
12261226 {
12271227 cxcm_constexpr_assert (value != std::numeric_limits<T>::min (), " undefined behavior in abs()" );
12281228
@@ -1925,13 +1925,13 @@ namespace dsga
19251925 auto copy = basic_vector<T, Count>(*this );
19261926 if (by > 0 )
19271927 {
1928- int count = by > max_val ? max_val : by ;
1928+ int count = by;
19291929 std::ranges::rotate (copy, copy.begin () + count);
19301930 }
19311931 else if (by < 0 )
19321932 {
1933- int count = -by > max_val ? max_val : -by ;
1934- std::ranges::rotate (copy, copy.begin () + max_val - count);
1933+ int count = -by;
1934+ std::ranges::rotate (copy, copy.begin () + ( max_val - count) );
19351935 }
19361936
19371937 return copy;
@@ -2033,8 +2033,8 @@ namespace dsga
20332033 constexpr indexed_vector_const_iterator () noexcept = default;
20342034 constexpr indexed_vector_const_iterator (const indexed_vector_const_iterator &) noexcept = default;
20352035 constexpr indexed_vector_const_iterator (indexed_vector_const_iterator &&) noexcept = default;
2036- constexpr indexed_vector_const_iterator &operator =(const indexed_vector_const_iterator &) noexcept = default ;
2037- constexpr indexed_vector_const_iterator &operator =(indexed_vector_const_iterator &&) noexcept = default ;
2036+ constexpr indexed_vector_const_iterator &operator =(const indexed_vector_const_iterator &) & noexcept = default ;
2037+ constexpr indexed_vector_const_iterator &operator =(indexed_vector_const_iterator &&) & noexcept = default ;
20382038 constexpr ~indexed_vector_const_iterator () = default ;
20392039
20402040 [[nodiscard]] constexpr reference operator *() const noexcept
@@ -2179,8 +2179,8 @@ namespace dsga
21792179 constexpr indexed_vector_iterator () noexcept = default;
21802180 constexpr indexed_vector_iterator (const indexed_vector_iterator &) noexcept = default;
21812181 constexpr indexed_vector_iterator (indexed_vector_iterator &&) noexcept = default;
2182- constexpr indexed_vector_iterator &operator =(const indexed_vector_iterator &) noexcept = default ;
2183- constexpr indexed_vector_iterator &operator =(indexed_vector_iterator &&) noexcept = default ;
2182+ constexpr indexed_vector_iterator &operator =(const indexed_vector_iterator &) & noexcept = default ;
2183+ constexpr indexed_vector_iterator &operator =(indexed_vector_iterator &&) & noexcept = default ;
21842184 constexpr ~indexed_vector_iterator () = default ;
21852185
21862186 [[nodiscard]] constexpr reference operator *() const noexcept
@@ -2296,7 +2296,7 @@ namespace dsga
22962296 // copy assignment
22972297 template <bool W, dimensional_scalar U, typename D>
22982298 requires Writable && implicitly_convertible_to<U, T>
2299- constexpr indexed_vector &operator =(const vector_base<W, U, Count, D> &other) noexcept
2299+ constexpr indexed_vector &operator =(const vector_base<W, U, Count, D> &other) & noexcept
23002300 {
23012301 [&]<std::size_t ...Js >(std::index_sequence<Js ...>) noexcept
23022302 {
@@ -2310,7 +2310,7 @@ namespace dsga
23102310 // assignment for some scalar type that converts to T and is only for indexed_vector of [Count == 1]
23112311 template <dimensional_scalar U>
23122312 requires Writable && implicitly_convertible_to<U, T> && (Count == 1 )
2313- constexpr indexed_vector &operator =(U other) noexcept
2313+ constexpr indexed_vector &operator =(U other) & noexcept
23142314 {
23152315 set (other);
23162316
@@ -2685,8 +2685,8 @@ namespace dsga
26852685
26862686 constexpr basic_vector (const basic_vector &) noexcept = default;
26872687 constexpr basic_vector (basic_vector &&) noexcept = default;
2688- constexpr basic_vector &operator =(const basic_vector &) noexcept = default ;
2689- constexpr basic_vector &operator =(basic_vector &&) noexcept = default ;
2688+ constexpr basic_vector &operator =(const basic_vector &) & noexcept = default ;
2689+ constexpr basic_vector &operator =(basic_vector &&) & noexcept = default ;
26902690
26912691 //
26922692 // constructors
@@ -2725,15 +2725,15 @@ namespace dsga
27252725
27262726 template <bool W, dimensional_scalar U, typename D>
27272727 requires Writable && implicitly_convertible_to<U, T>
2728- constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) noexcept
2728+ constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) & noexcept
27292729 {
27302730 set (other[0 ]);
27312731 return *this ;
27322732 }
27332733
27342734 template <typename U>
27352735 requires Writable && implicitly_convertible_to<U, T>
2736- constexpr basic_vector &operator =(U value) noexcept
2736+ constexpr basic_vector &operator =(U value) & noexcept
27372737 {
27382738 set (value);
27392739 return *this ;
@@ -2884,8 +2884,8 @@ namespace dsga
28842884
28852885 constexpr basic_vector (const basic_vector &) noexcept = default;
28862886 constexpr basic_vector (basic_vector &&) noexcept = default;
2887- constexpr basic_vector &operator =(const basic_vector &) noexcept = default ;
2888- constexpr basic_vector &operator =(basic_vector &&) noexcept = default ;
2887+ constexpr basic_vector &operator =(const basic_vector &) & noexcept = default ;
2888+ constexpr basic_vector &operator =(basic_vector &&) & noexcept = default ;
28892889
28902890 //
28912891 // constructors
@@ -2931,7 +2931,7 @@ namespace dsga
29312931
29322932 template <bool W, dimensional_scalar U, typename D>
29332933 requires Writable && implicitly_convertible_to<U, T>
2934- constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) noexcept
2934+ constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) & noexcept
29352935 {
29362936 set (other[0 ], other[1 ]);
29372937 return *this ;
@@ -3158,8 +3158,8 @@ namespace dsga
31583158
31593159 constexpr basic_vector (const basic_vector &) noexcept = default;
31603160 constexpr basic_vector (basic_vector &&) noexcept = default;
3161- constexpr basic_vector &operator =(const basic_vector &) noexcept = default ;
3162- constexpr basic_vector &operator =(basic_vector &&) noexcept = default ;
3161+ constexpr basic_vector &operator =(const basic_vector &) & noexcept = default ;
3162+ constexpr basic_vector &operator =(basic_vector &&) & noexcept = default ;
31633163
31643164 //
31653165 // constructors
@@ -3207,7 +3207,7 @@ namespace dsga
32073207
32083208 template <bool W, dimensional_scalar U, typename D>
32093209 requires Writable && implicitly_convertible_to<U, T>
3210- constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) noexcept
3210+ constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) & noexcept
32113211 {
32123212 set (other[0 ], other[1 ], other[2 ]);
32133213 return *this ;
@@ -3654,8 +3654,8 @@ namespace dsga
36543654
36553655 constexpr basic_vector (const basic_vector &) noexcept = default;
36563656 constexpr basic_vector (basic_vector &&) noexcept = default;
3657- constexpr basic_vector &operator =(const basic_vector &) noexcept = default ;
3658- constexpr basic_vector &operator =(basic_vector &&) noexcept = default ;
3657+ constexpr basic_vector &operator =(const basic_vector &) & noexcept = default ;
3658+ constexpr basic_vector &operator =(basic_vector &&) & noexcept = default ;
36593659
36603660 //
36613661 // constructors
@@ -3706,7 +3706,7 @@ namespace dsga
37063706
37073707 template <bool W, dimensional_scalar U, typename D>
37083708 requires Writable && implicitly_convertible_to<U, T>
3709- constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) noexcept
3709+ constexpr basic_vector &operator =(const vector_base<W, U, Count, D> &other) & noexcept
37103710 {
37113711 set (other[0 ], other[1 ], other[2 ], other[3 ]);
37123712 return *this ;
@@ -6132,8 +6132,8 @@ namespace dsga
61326132
61336133 constexpr basic_matrix (const basic_matrix &) noexcept = default ;
61346134 constexpr basic_matrix (basic_matrix &&) noexcept = default ;
6135- constexpr basic_matrix &operator =(const basic_matrix &) noexcept = default ;
6136- constexpr basic_matrix &operator =(basic_matrix &&) noexcept = default ;
6135+ constexpr basic_matrix &operator =(const basic_matrix &) & noexcept = default ;
6136+ constexpr basic_matrix &operator =(basic_matrix &&) & noexcept = default ;
61376137
61386138 //
61396139 // constructors
@@ -6236,7 +6236,7 @@ namespace dsga
62366236
62376237 template <floating_point_scalar U>
62386238 requires implicitly_convertible_to<U, T>
6239- constexpr basic_matrix &operator =(const basic_matrix<U, C, R> &other) noexcept
6239+ constexpr basic_matrix &operator =(const basic_matrix<U, C, R> &other) & noexcept
62406240 {
62416241 [&]<std::size_t ...Is >(std::index_sequence<Is...>) noexcept
62426242 {
0 commit comments