This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/55043] [4.7/4.8 Regression] issue with nesting unordered_map containing unique_ptr into vector


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 ]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]