Author
anonymous
about 5 years ago
Language
C++
Compiler
gcc HEAD 10.0.0 20191224 (experimental)
Options
Warnings
Boost 1.72.0
C++11
no pedantic
Raw compiler options
-pthread
Author
anonymous
about 5 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.72.0/gcc-head/include -std=c++11 -pthread
prog.cc: In function 'int main()':
prog.cc:11:28: error: no matching function for call to 'std::vector<std::atomic<bool> >::assign(int&, bool)'
11 | myvector.assign(N,false);
| ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/vector:67,
from prog.cc:3:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:746:7: note: candidate: 'void std::vector<_Tp, _Alloc>::assign(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::atomic<bool>; _Alloc = std::allocator<std::atomic<bool> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::atomic<bool>]'
746 | assign(size_type __n, const value_type& __val)
| ^~~~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:746:47: note: no known conversion for argument 2 from 'bool' to 'const value_type&' {aka 'const std::atomic<bool>&'}
746 | assign(size_type __n, const value_type& __val)
| ~~~~~~~~~~~~~~~~~~^~~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:765:2: note: candidate: 'template<class _InputIterator, class> void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = std::atomic<bool>; _Alloc = std::allocator<std::atomic<bool> >]'
765 | assign(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:765:2: note: template argument deduction/substitution failed:
prog.cc:11:28: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'bool')
11 | myvector.assign(N,false);
| ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/vector:67,
from prog.cc:3:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:791:7: note: candidate: 'void std::vector<_Tp, _Alloc>::assign(std::initializer_list<_Tp>) [with _Tp = std::atomic<bool>; _Alloc = std::allocator<std::atomic<bool> >]'
791 | assign(initializer_list<value_type> __l)
| ^~~~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:791:7: note: candidate expects 1 argument, 2 provided
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::atomic<bool>; _Alloc = std::allocator<std::atomic<bool> >]':
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:484:7: required from here
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:333:35: error: invalid use of incomplete type 'struct std::atomic<bool>'
333 | _M_impl._M_end_of_storage - _M_impl._M_start);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/shared_ptr_atomic.h:33,
from /opt/wandbox/gcc-head/include/c++/10.0.0/memory:84,
from /opt/wandbox/gcc-head/include/c++/10.0.0/thread:44,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/atomic_base.h:146:12: note: declaration of 'struct std::atomic<bool>'
146 | struct atomic;
| ^~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/move.h:57,
from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/nested_exception.h:40,
from /opt/wandbox/gcc-head/include/c++/10.0.0/exception:148,
from /opt/wandbox/gcc-head/include/c++/10.0.0/ios:39,
from /opt/wandbox/gcc-head/include/c++/10.0.0/ostream:38,
from /opt/wandbox/gcc-head/include/c++/10.0.0/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/type_traits: In instantiation of 'struct std::is_destructible<std::atomic<bool> >':
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_construct.h:183:51: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::atomic<bool>*]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/alloc_traits.h:733:15: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = std::atomic<bool>*; _Tp = std::atomic<bool>]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:677:15: required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::atomic<bool>; _Alloc = std::allocator<std::atomic<bool> >]'
prog.cc:9:26: required from here
/opt/wandbox/gcc-head/include/c++/10.0.0/type_traits:838:52: error: static assertion failed: template argument must be a complete class or an unbounded array
838 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/alloc_traits.h:33,
from /opt/wandbox/gcc-head/include/c++/10.0.0/ext/alloc_traits.h:34,
from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/basic_string.h:40,
from /opt/wandbox/gcc-head/include/c++/10.0.0/string:55,
from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/locale_classes.h:40,
from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/ios_base.h:41,
from /opt/wandbox/gcc-head/include/c++/10.0.0/ios:42,
from /opt/wandbox/gcc-head/include/c++/10.0.0/ostream:38,
from /opt/wandbox/gcc-head/include/c++/10.0.0/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_construct.h: In instantiation of 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::atomic<bool>*]':
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/alloc_traits.h:733:15: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = std::atomic<bool>*; _Tp = std::atomic<bool>]'
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_vector.h:677:15: required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::atomic<bool>; _Alloc = std::allocator<std::atomic<bool> >]'
prog.cc:9:26: required from here
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_construct.h:183:51: error: static assertion failed: value type is destructible
183 | static_assert(is_destructible<_Value_type>::value,
| ^~~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_construct.h:190:25: error: invalid use of incomplete type 'std::iterator_traits<std::atomic<bool>*>::value_type' {aka 'struct std::atomic<bool>'}
190 | std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/bits/shared_ptr_atomic.h:33,
from /opt/wandbox/gcc-head/include/c++/10.0.0/memory:84,
from /opt/wandbox/gcc-head/include/c++/10.0.0/thread:44,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/atomic_base.h:146:12: note: declaration of 'std::iterator_traits<std::atomic<bool>*>::value_type' {aka 'struct std::atomic<bool>'}
146 | struct atomic;
| ^~~~~~
Exit Code:
1