This MR removes the separate specialization of FieldVector<K,1>
as a scalar type. Instead some functions are added to the primary template constrained to be only valid of SIZE == 1
case. Additionally, the interaction with scalar (field) types is being improved by allowing any type that is counted as IsNumber
. Some alternatives were considered. Due to the implicit conversion operator of FieldVector<K,1>
to const K&
, several options lead to ambiguities.
Instead of using std::enable_if
to constrain the functions to specific cases, this MR uses c++20 concepts and a requires
clause. This makes the code more readable and the error messages better explaining what the problem is.