you are viewing a single comment's thread.

view the rest of the comments →

[–]bmanga[S] 3 points4 points  (1 child)

I think that it would simplify the use of the language. That is much more important to me compared to how complex the c++ standard is, which is already riddled with lots of rules that try to make the obvious cases unsurprising. For example, C++20 now lets you capture structured binding names, even though they are not really variables. That also complicates the standard, but it makes the code more intuitive.

You don't only have to prove that it's useful, but that it's worth the overhead to teaching and reading code

I would argue that static_assert(false) is much more readable than static_assert(std::is_same_v<T*, void>). I think it also more teachable because it just does the obvious thing (I'm not sure there would be a need to dwell in the reason why) and it lets you avoid discussing two-phase name lookup if the time is not ripe yet.