prog.cpp: In function ‘int main()’:
prog.cpp:11:15: error: no matching function for call to ‘begin(std::queue<int>&)’
for (auto i : Q)
^
prog.cpp:11:15: note: candidates are:
In file included from /usr/include/c++/4.8/deque:65:0,
from /usr/include/c++/4.8/queue:60,
from prog.cpp:1:
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template<class _Tp, unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
prog.cpp:11:15: note: mismatched types ‘_Tp [_Nm]’ and ‘std::queue<int>’
for (auto i : Q)
^
In file included from /usr/include/c++/4.8/deque:65:0,
from /usr/include/c++/4.8/queue:60,
from prog.cpp:1:
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::queue<int>]’:
prog.cpp:11:15: required from here
/usr/include/c++/4.8/bits/range_access.h:58:5: error: ‘const class std::queue<int>’ has no member named ‘begin’
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::queue<int>]’:
prog.cpp:11:15: required from here
/usr/include/c++/4.8/bits/range_access.h:48:5: error: ‘class std::queue<int>’ has no member named ‘begin’
In file included from /usr/include/c++/4.8/bits/stl_deque.h:63:0,
from /usr/include/c++/4.8/deque:64,
from /usr/include/c++/4.8/queue:60,
from prog.cpp:1:
/usr/include/c++/4.8/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:89:5: note: template argument deduction/substitution failed:
prog.cpp:11:15: note: ‘std::queue<int>’ is not derived from ‘std::initializer_list<_Tp>’
for (auto i : Q)
^
prog.cpp:11:15: error: no matching function for call to ‘end(std::queue<int>&)’
prog.cpp:11:15: note: candidates are:
In file included from /usr/include/c++/4.8/deque:65:0,
from /usr/include/c++/4.8/queue:60,
from prog.cpp:1:
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template<class _Tp, unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
prog.cpp:11:15: note: mismatched types ‘_Tp [_Nm]’ and ‘std::queue<int>’
for (auto i : Q)
^
In file included from /usr/include/c++/4.8/deque:65:0,
from /usr/include/c++/4.8/queue:60,
from prog.cpp:1:
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = std::queue<int>]’:
prog.cpp:11:15: required from here
/usr/include/c++/4.8/bits/range_access.h:78:5: error: ‘const class std::queue<int>’ has no member named ‘end’
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = std::queue<int>]’:
prog.cpp:11:15: required from here
/usr/include/c++/4.8/bits/range_access.h:68:5: error: ‘class std::queue<int>’ has no member named ‘end’
In file included from /usr/include/c++/4.8/bits/stl_deque.h:63:0,
from /usr/include/c++/4.8/deque:64,
from /usr/include/c++/4.8/queue:60,
from prog.cpp:1:
/usr/include/c++/4.8/initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:99:5: note: template argument deduction/substitution failed:
prog.cpp:11:15: note: ‘std::queue<int>’ is not derived from ‘std::initializer_list<_Tp>’
for (auto i : Q)
^