wg21 icon indicating copy to clipboard operation
wg21 copied to clipboard

`constexpr` all the things

Open mpusz opened this issue 5 years ago • 1 comments

LA operators are not constexpr for statically known bounds (literal types). The following code fails to compile:

template<Unit U = si::metre>
using v_length = fs_vector<si::length<U>, 3>;

static_assert(v_length<>{ 1q_m, 2q_m, 3q_m } + v_length<>{ 3q_m, 2q_m, 1q_m } == v_length<>{ 4q_m, 4q_m, 4q_m });

mpusz avatar Mar 25 '20 16:03 mpusz

done for r7z

BobSteagall avatar Jan 01 '23 18:01 BobSteagall