Replying to @vzverovich @mknejp
Which breaks generic programming. The same code in vector space should work in scalar space as well.
37
Replying to @mknejp
Yea simd works in vector space so returning a mask is regular. Implicitly going from scalar space to vector space (ie returning a bool) is error prone.
1
472
Replying to @david_sankel @__qualname__
Returning a mask is still regular it’s just a vectorized regular instead of a scalar regular. Of course implicitly going from a vector to a scalar seems very problematic, it should be done explicitly.
2
2
141
Replying to @ericniebler
The recursion trick is from Paul Mensonides and not from me(although I did write about it).
1
3
266
Replying to @seanbax
Implicit enum conversion is very useful as neither clang-tidy nor cppcheck warn about this either. I have a change to add a check to clang tidy for this(waiting to be merged since summer as llvm is a pain to contribute to): reviews.llvm.org/D129570
42
Cppcheck uses string literals in test cases. For checking diagnostics its pretty horrible, but for checking internal data structures(ie that the ast node has a certain property) it works better I think.
Replying to @ericniebler
If only C++ could support monadic comprehension as a language feature: [for(auto x:parse_int()) for(auto y:parse_int()) return x+y]
The only question is how to express the capturing because async you want by value but for errors and parsing you might want by ref.
2
It does the same for enable_if as well. If it can’t get good diagnostics with something a decade old, i would expect much less with a newer language feature.
Replying to @aDifferentJT @seanbax
I always construct them, and others on projects I worked would use this style as well. Using ::value is very c++98 style.
1
Yea the lazy eval is important. Its too bad we have to write:
lazy_and<is_bar<T>, is_foo<T>>{}
instead of:
is_bar<T>{} and is_foo<T>{}
Just to get compile-time short-circuiting.
1
If only the standard allowed is_foo<T> to be a template alias. You get the pros of using integral_constant without perf penalty, plus user specialization would be a clear compile error.
1
1
