Re: [c++-concepts] Check function concept definitions

2014-09-29 Thread Roland Bock
On 2014-09-29 18:32, Jason Merrill wrote: > On 09/29/2014 11:46 AM, Andrew Sutton wrote: >> The main reason for the restriction is that concept definitions are >> normalized into a single constraint-expression. And it's not obvious >> how things like using declarations and static-assertions should

Re: [c++-concepts] Check function concept definitions

2014-09-29 Thread Jason Merrill
On 09/29/2014 11:46 AM, Andrew Sutton wrote: The main reason for the restriction is that concept definitions are normalized into a single constraint-expression. And it's not obvious how things like using declarations and static-assertions should be interpreted within the constraint language. A

Re: [c++-concepts] Check function concept definitions

2014-09-29 Thread Andrew Sutton
> Hmm, have we actually discussed this in core review? I'm not seeing it on > the wiki. Constexpr started out this way too, and allowing static_assert > was added pretty fast. C++11 said > > its function-body shall be = delete, = default, or a compound-statement that > contains only > — null sta

Re: [c++-concepts] Check function concept definitions

2014-09-29 Thread Jason Merrill
On 09/29/2014 10:55 AM, Andrew Sutton wrote: Jason, do you want to review this before I commit? This is a pretty small patch. No need to wait for review before committing to the branch. + // If fn was declared with auto, make sure the result type is bool. + if (FNDECL_USED_AUTO (fn) && TREE