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++/58982] [4.9 Regression] std::vector<std::atomic<int>> vai(10); does not compile anymore


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);
     }


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