This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/55043] [4.7/4.8 Regression] issue with nesting unordered_map containing unique_ptr into vector
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 24 Oct 2012 08:33:47 +0000
- Subject: [Bug libstdc++/55043] [4.7/4.8 Regression] issue with nesting unordered_map containing unique_ptr into vector
- Auto-submitted: auto-generated
- References: <bug-55043-4@http.gcc.gnu.org/bugzilla/>
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 ]