Am 27.02.2013 18:05, schrieb SG:
>
> On Jan 23, 12:26 am, Daniel Kr�gler wrote:
> [snip]
>
>> template<bool C, class T = void>
>> using EnableIf = typename std::enable_if<C, T>::type;
>
>
> Is the right hand side of this template alias considered an immediate
> context with respect to SFINAE?
Let me start with a general remark in regard to "immediate context"
used in 14.8: The Standard committee had introduced this term knowing
that this is a fuzzy definition. In regard to alias templates the
wording *could* be interpreted as if the "definition of alias would be
a different context. In general, this is not intended, because alias
substitution is supposed to happen very early. I think that this usage
of alias template is safe (and considered to be in the immediate
context) when you compare it with
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1558
The current suggestion is that
a) Substitution happens in the immediate context of the template that
had causes the substitution
b) Access checking (see CWG issue
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1554
) is performed in the context of the definition of alias template.
HTH & Greetings from Bremen,
Daniel Kr�gler