Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$
prog.cc: In function 'int main()':
prog.cc:7:36: error: class template argument deduction failed:
std::set s2(s1.begin(), s1.end());
^
prog.cc:7:36: error: no matching function for call to 'set(std::set<int, std::less<int>, std::allocator<int> >::iterator, std::set<int, std::less<int>, std::allocator<int> >::iterator)'
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:261:2: note: candidate: template<class _Key, class _Compare, class _Alloc, class _InputIterator> set(_InputIterator, _InputIterator, const _Alloc&)-> std::set<_Key, _Compare, _Alloc>
set(_InputIterator __first, _InputIterator __last,
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:261:2: note: template argument deduction/substitution failed:
prog.cc:7:36: note: candidate expects 3 arguments, 2 provided
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:255:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(std::initializer_list<_Tp>, const allocator_type&)-> std::set<_Key, _Compare, _Alloc>
set(initializer_list<value_type> __l, const allocator_type& __a)
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:255:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'std::initializer_list<_Tp>'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:249:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(std::set<_Key, _Compare, _Alloc>&&, const allocator_type&)-> std::set<_Key, _Compare, _Alloc>
set(set&& __x, const allocator_type& __a)
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:249:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: 'std::set<int, std::less<int>, std::allocator<int> >::iterator {aka std::_Rb_tree_const_iterator<int>}' is not derived from 'std::set<_Key, _Compare, _Alloc>'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:245:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(const std::set<_Key, _Compare, _Alloc>&, const allocator_type&)-> std::set<_Key, _Compare, _Alloc>
set(const set& __x, const allocator_type& __a)
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:245:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: 'std::set<int, std::less<int>, std::allocator<int> >::iterator {aka std::_Rb_tree_const_iterator<int>}' is not derived from 'const std::set<_Key, _Compare, _Alloc>'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:241:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(const allocator_type&)-> std::set<_Key, _Compare, _Alloc>
set(const allocator_type& __a)
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:241:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: candidate expects 1 argument, 2 provided
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:233:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(std::initializer_list<_Tp>, const _Compare&, const allocator_type&)-> std::set<_Key, _Compare, _Alloc>
set(initializer_list<value_type> __l,
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:233:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'std::initializer_list<_Tp>'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:221:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(std::set<_Key, _Compare, _Alloc>&&)-> std::set<_Key, _Compare, _Alloc>
set(set&&) = default;
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:221:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: 'std::set<int, std::less<int>, std::allocator<int> >::iterator {aka std::_Rb_tree_const_iterator<int>}' is not derived from 'std::set<_Key, _Compare, _Alloc>'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:213:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(const std::set<_Key, _Compare, _Alloc>&)-> std::set<_Key, _Compare, _Alloc>
set(const set&) = default;
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:213:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: 'std::set<int, std::less<int>, std::allocator<int> >::iterator {aka std::_Rb_tree_const_iterator<int>}' is not derived from 'const std::set<_Key, _Compare, _Alloc>'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:198:2: note: candidate: template<class _Key, class _Compare, class _Alloc, class _InputIterator> set(_InputIterator, _InputIterator, const _Compare&, const _Alloc&)-> std::set<_Key, _Compare, _Alloc>
set(_InputIterator __first, _InputIterator __last,
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:198:2: note: template argument deduction/substitution failed:
prog.cc:7:36: note: candidate expects 4 arguments, 2 provided
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:181:2: note: candidate: template<class _Key, class _Compare, class _Alloc, class _InputIterator> set(_InputIterator, _InputIterator)-> std::set<_Key, _Compare, _Alloc>
set(_InputIterator __first, _InputIterator __last)
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:181:2: note: template argument deduction/substitution failed:
prog.cc:7:36: note: couldn't deduce template parameter '_Key'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:166:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set(const _Compare&, const allocator_type&)-> std::set<_Key, _Compare, _Alloc>
set(const _Compare& __comp,
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:166:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: couldn't deduce template parameter '_Key'
std::set s2(s1.begin(), s1.end());
^
In file included from /opt/wandbox/gcc-7.2.0/include/c++/7.2.0/set:61:0,
from prog.cc:2:
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:157:7: note: candidate: template<class _Key, class _Compare, class _Alloc> set()-> std::set<_Key, _Compare, _Alloc>
set() = default;
^~~
/opt/wandbox/gcc-7.2.0/include/c++/7.2.0/bits/stl_set.h:157:7: note: template argument deduction/substitution failed:
prog.cc:7:36: note: candidate expects 0 arguments, 2 provided
std::set s2(s1.begin(), s1.end());
^
Exit Code:
1