On Wed, Mar 28, 2012 at 4:24 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:

It looks like the trick is to put the enable_if outside the BOOST_CONCEPT_REQUIRES, as in:

template <typename T>
typename enable_if<
          condition,
          BOOST_CONCEPT_REQUIRES(concept, (void))>::type

Paragraph 4 of [dcl.fct] (in the latest draft) seems to say that the SFINAE error you are getting is required: only the specific type void, written in a non-dependent way, counts as a valid function parameter type.


Well, I can't deny that it works! Seems to be reading quite a bit into the standard tho', assuming you're looking at

 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf

If I'm reading it right it is actually talking about function parameter lists, rather than function return types, and stating that
void is not a valid parameter type except for f(void) to indicate an empty parameter list.

Thx, Rob.