This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58982] [4.9 Regression] std::vector<std::atomic<int>> vai(10); does not compile anymore
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Nov 2013 01:00:50 +0000
- Subject: [Bug libstdc++/58982] [4.9 Regression] std::vector<std::atomic<int>> vai(10); does not compile anymore
- Auto-submitted: auto-generated
- References: <bug-58982-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58982
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I think at least something like this for this specific bug, but the whole file
needs auditing:
Index: stl_uninitialized.h
===================================================================
--- stl_uninitialized.h (revision 204342)
+++ stl_uninitialized.h (working copy)
@@ -527,7 +527,8 @@
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
- std::__uninitialized_default_1<__is_trivial(_ValueType)>::
+ std::__uninitialized_default_1
+ <std::is_copy_constructible<_ValueType>::value>::
__uninit_default(__first, __last);
}
@@ -540,7 +541,8 @@
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
- std::__uninitialized_default_n_1<__is_trivial(_ValueType)>::
+ std::__uninitialized_default_n_1
+ <std::is_copy_constructible<_ValueType>::value>::
__uninit_default_n(__first, __n);
}