std::valarrayuses expression patterns. Template expressions do not work well with return type inference.
In this case, x*std::valarray<int>{1}it returns an expression that says "multiply xby some std::valarray<int>. By the time, when you use an object is mkboth xand std::valarray<int>fell outside the scope of.
( ): segfault. undefined.
, , . , auto.
- operator auto - , , - . , , " a valarray" - . .