/in/foo.cc: In function 'int main()':
/in/foo.cc:52:14: error: reference to 'begin' is ambiguous
copy(start, begin.state), begin.step = 0;
^~~~~
/in/foo.cc:13:6: note: candidates are: node begin
node begin, temp, trans;
^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
from /in/foo.cc:1:
/usr/include/c++/6/valarray:1206:5: note: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
begin(const valarray<_Tp>& __va)
^~~~~
/usr/include/c++/6/valarray:1196:5: note: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
begin(valarray<_Tp>& __va)
^~~~~
In file included from /usr/include/c++/6/string:51:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
/usr/include/c++/6/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++/6/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
from /usr/include/c++/6/string:51,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~
/in/foo.cc:52:28: error: reference to 'begin' is ambiguous
copy(start, begin.state), begin.step = 0;
^~~~~
/in/foo.cc:13:6: note: candidates are: node begin
node begin, temp, trans;
^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
from /in/foo.cc:1:
/usr/include/c++/6/valarray:1206:5: note: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
begin(const valarray<_Tp>& __va)
^~~~~
/usr/include/c++/6/valarray:1196:5: note: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
begin(valarray<_Tp>& __va)
^~~~~
In file included from /usr/include/c++/6/string:51:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
/usr/include/c++/6/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++/6/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
from /usr/include/c++/6/string:51,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~
/in/foo.cc:53:9: error: reference to 'begin' is ambiguous
q.push(begin);
^~~~~
/in/foo.cc:13:6: note: candidates are: node begin
node begin, temp, trans;
^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
from /in/foo.cc:1:
/usr/include/c++/6/valarray:1206:5: note: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
begin(const valarray<_Tp>& __va)
^~~~~
/usr/include/c++/6/valarray:1196:5: note: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
begin(valarray<_Tp>& __va)
^~~~~
In file included from /usr/include/c++/6/string:51:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
/usr/include/c++/6/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++/6/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
from /usr/include/c++/6/string:51,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~