Date: Sat, 4 Jan 2020 13:53:09 +0100
On 2020-01-03 at 21:46, Askar Safin via Std-Proposals wrote:
> TL;DR: Require users to specify all necessary concepts in template. This
> is, of course, incompatible change, so it should be implemented using
> epochs ( http://wg21.link/P1881 ). This is what templates should be
> right from the beginning. If this is not acceptable, then require
> programmers to specify all concepts if they specified at least one (this
> is not breaking change compared to C++17).
I get a feeling that
void f() requires Any && Possible && Concept
{}
looks way too similar to
void f() throw(Any, Possible, Exception)
{}
The latter has been removed from the language, as it really didn't work
well.
The main(?) problem being that if one function added a new possible
exception, every function calling it - directly or indirectly - would
have to be modified as well.
Will we not get the same effect with this new feature?
Bo Persson
> TL;DR: Require users to specify all necessary concepts in template. This
> is, of course, incompatible change, so it should be implemented using
> epochs ( http://wg21.link/P1881 ). This is what templates should be
> right from the beginning. If this is not acceptable, then require
> programmers to specify all concepts if they specified at least one (this
> is not breaking change compared to C++17).
I get a feeling that
void f() requires Any && Possible && Concept
{}
looks way too similar to
void f() throw(Any, Possible, Exception)
{}
The latter has been removed from the language, as it really didn't work
well.
The main(?) problem being that if one function added a new possible
exception, every function calling it - directly or indirectly - would
have to be modified as well.
Will we not get the same effect with this new feature?
Bo Persson
Received on 2020-01-04 06:55:49