http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55043

--- Comment #12 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-10-24 08:33:47 UTC ---
(In reply to comment #11)
> That seems inconsistent with 20.9.4.3/6
> 
> the predicate condition for a template specialization is_constructible<T,
> Args...> shall be satisfied if and only if the following variable definition
> would be well-formed for some invented variable t:
>     T t(create<Args>()...);
> 
> and that variable definition is not well-formed:
> 
>   const N<M>& create();
>   N<M> t(create());

I think this is covered by that wording, which was added very late to ensure
that only the immediate context is relevant:

"Only the validity of the immediate context of the variable initialization is
considered. [ Note: The evaluation of the initialization can result in side
effects such as the instantiation of class template specializations and
function template specializations, the generation of implicitly-defined
functions, and so on. Such side effects are not in the “immediate context” and
can result in the program being ill-formed. —end note ]

Reply via email to