Author
anonymous
over 4 years ago
Language
C++
Compiler
gcc HEAD 11.0.1 20210325 (experimental)
Options
Warnings
Boost 1.73.0
C++2b(GNU)
no pedantic
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2b
prog.cc: In function 'int main()':
prog.cc:17:32: error: class template argument deduction failed:
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
prog.cc:17:32: error: no matching function for call to 'stack(std::pmr::vector<int>&, std::pmr::monotonic_buffer_resource*)'
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:191:9: note: candidate: 'template<class _Tp, class _Sequence, class _Alloc, class _Requires> stack(std::stack<_Tp, _Seq>&&, const _Alloc&)-> std::stack<_Tp, _Sequence>'
191 | stack(stack&& __q, const _Alloc& __a)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:191:9: note: template argument deduction/substitution failed:
prog.cc:17:32: note: 'std::pmr::vector<int>' {aka 'std::vector<int, std::pmr::polymorphic_allocator<int> >'} is not derived from 'std::stack<_Tp, _Seq>'
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:187:9: note: candidate: 'template<class _Tp, class _Sequence, class _Alloc, class _Requires> stack(const std::stack<_Tp, _Seq>&, const _Alloc&)-> std::stack<_Tp, _Sequence>'
187 | stack(const stack& __q, const _Alloc& __a)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:187:9: note: template argument deduction/substitution failed:
prog.cc:17:32: note: 'std::pmr::vector<int>' {aka 'std::vector<int, std::pmr::polymorphic_allocator<int> >'} is not derived from 'const std::stack<_Tp, _Seq>'
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:183:9: note: candidate: 'template<class _Tp, class _Sequence, class _Alloc, class _Requires> stack(_Sequence&&, const _Alloc&)-> std::stack<_Tp, _Sequence>'
183 | stack(_Sequence&& __c, const _Alloc& __a)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:183:9: note: template argument deduction/substitution failed:
prog.cc:17:32: note: couldn't deduce template parameter '_Tp'
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:179:9: note: candidate: 'template<class _Tp, class _Sequence, class _Alloc, class _Requires> stack(const _Sequence&, const _Alloc&)-> std::stack<_Tp, _Sequence>'
179 | stack(const _Sequence& __c, const _Alloc& __a)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:179:9: note: template argument deduction/substitution failed:
prog.cc:17:32: note: couldn't deduce template parameter '_Tp'
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:175:9: note: candidate: 'template<class _Tp, class _Sequence, class _Alloc, class _Requires> stack(const _Alloc&)-> std::stack<_Tp, _Sequence>'
175 | stack(const _Alloc& __a)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:175:9: note: template argument deduction/substitution failed:
prog.cc:17:32: note: candidate expects 1 argument, 2 provided
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:170:7: note: candidate: 'template<class _Tp, class _Sequence> stack(_Sequence&&)-> std::stack<_Tp, _Sequence>'
170 | stack(_Sequence&& __c)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:170:7: note: template argument deduction/substitution failed:
prog.cc:17:32: note: candidate expects 1 argument, 2 provided
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:166:7: note: candidate: 'template<class _Tp, class _Sequence> stack(const _Sequence&)-> std::stack<_Tp, _Sequence>'
166 | stack(const _Sequence& __c)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:166:7: note: template argument deduction/substitution failed:
prog.cc:17:32: note: candidate expects 1 argument, 2 provided
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:162:9: note: candidate: 'template<class _Tp, class _Sequence, class _Seq, class _Requires> stack()-> std::stack<_Tp, _Sequence>'
162 | stack()
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:162:9: note: template argument deduction/substitution failed:
prog.cc:17:32: note: candidate expects 0 arguments, 2 provided
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:99:11: note: candidate: 'template<class _Tp, class _Sequence> stack(std::stack<_Tp, _Sequence>)-> std::stack<_Tp, _Sequence>'
99 | class stack
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:99:11: note: template argument deduction/substitution failed:
prog.cc:17:32: note: 'std::vector<int, std::pmr::polymorphic_allocator<int> >' is not derived from 'std::stack<_Tp, _Sequence>'
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:301:5: note: candidate: 'template<class _Container, class _Allocator, class, class> std::stack(_Container, _Allocator)-> std::stack<typename _Container::value_type, _Container>'
301 | stack(_Container, _Allocator)
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:301:5: note: template argument deduction/substitution failed:
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/ext/alloc_traits.h:34,
from /opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_uninitialized.h:64,
from /opt/wandbox/gcc-head/include/c++/11.0.1/vector:66,
from /opt/wandbox/gcc-head/include/c++/11.0.1/memory_resource:36,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/alloc_traits.h: In substitution of 'template<class _Alloc> using _RequireAllocator = typename std::enable_if<std::__is_allocator<_Alloc>::value, _Alloc>::type [with _Alloc = std::pmr::monotonic_buffer_resource*]':
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:300:5: required from here
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/alloc_traits.h:705:11: error: no type named 'type' in 'struct std::enable_if<false, std::pmr::monotonic_buffer_resource*>'
705 | using _RequireAllocator
| ^~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/stack:61,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:296:5: note: candidate: 'template<class _Container, class> std::stack(_Container)-> std::stack<typename _Container::value_type, _Container>'
296 | stack(_Container) -> stack<typename _Container::value_type, _Container>;
| ^~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_stack.h:296:5: note: template argument deduction/substitution failed:
prog.cc:17:32: note: candidate expects 1 argument, 2 provided
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^
prog.cc:17:32: error: expression list treated as compound expression in functional cast [-fpermissive]
prog.cc:17:25: warning: left operand of comma operator has no effect [-Wunused-value]
17 | auto ds3 = std::stack(pv, &mr); // NG!
| ^~
Exit Code:
1