https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98451
Bug ID: 98451
Summary: Re-exporting iostream
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: patrick.kox at commandoregel dot be
Target Milestone: ---
I'm following an article by Mr. Sidwell on C++ Modules (link:
https://accu.org/journals/overload/28/159/sidwell/#FN02)
Around Example 02 he processes string_view to be able to use it in example 02,
this command works with string_view, but it fails with iostream
the command is: g++ -fmodules-ts -std=c++20 -c -x c++-system-header string_view
when string_view is copied to the source directory this creates a gcm file in a
subdirectory of gcm.cache
using this command with iostream there is the following output:
In file included from /opt/gcc-11/include/c++/11.0.0/bits/move.h:57,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_pair.h:59,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:64,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/type_traits:634:31: error: conflicting global
module declaration ‘template<class ...> using __void_t = void’
634 | template<typename...> using __void_t = void;
| ^~~~~~~~
In file included from /opt/gcc-11/include/c++/11.0.0/bits/move.h:57,
from
/opt/gcc-11/include/c++/11.0.0/bits/nested_exception.h:40,
from /opt/gcc-11/include/c++/11.0.0/exception:148,
from /opt/gcc-11/include/c++/11.0.0/ios:39,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/type_traits:634:31: note: existing declaration
‘template<class ...> using __void_t = void’
634 | template<typename...> using __void_t = void;
| ^~~~~~~~
In file included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:94:26: note: during load of
binding ‘__gnu_cxx::__normal_iterator’
94 | typedef __gnu_cxx::__normal_iterator<pointer, basic_string>
iterator;
| ^~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error:
conflicting global module declaration ‘template<class _Tp> using
iter_reference_t = decltype (* declval<_Tp&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing
declaration ‘template<class _Tp> requires __dereferenceable<_Tp> using
iter_reference_t = decltype (* declval<_Tp&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error:
conflicting global module declaration ‘using iter_reference_t = decltype (*
declval<_Tp&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing
declaration ‘using iter_reference_t = decltype (* declval<_Tp&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error:
conflicting global module declaration ‘template<class _Tp> using __type =
typename std::ranges::__cust_imove::_IMove::__result::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing
declaration ‘template<class _Tp> requires __dereferenceable<_Tp> using __type
= typename std::ranges::__cust_imove::_IMove::__result::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error:
conflicting global module declaration ‘using __type = typename
std::ranges::__cust_imove::_IMove::__result<_Tp>::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing
declaration ‘using __type = typename
std::ranges::__cust_imove::_IMove::__result<_Tp>::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error:
conflicting global module declaration ‘using __type = typename
std::ranges::__cust_imove::_IMove::__result<_Tp&>::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing
declaration ‘using __type = typename
std::ranges::__cust_imove::_IMove::__result<_Tp&>::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: error:
conflicting global module declaration ‘template<class _Tp> using
iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<_Tp&>’
146 | using iter_rvalue_reference_t
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: note: existing
declaration ‘template<class _Tp> requires (__dereferenceable<_Tp>) &&
(__can_reference<typename
std::ranges::__cust_imove::_IMove::__result<_Tp&>::type>) using
iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<_Tp&>’
146 | using iter_rvalue_reference_t
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: error:
conflicting global module declaration ‘using iter_rvalue_reference_t =
std::ranges::__cust_imove::_IMove::__type<_Tp&>’
146 | using iter_rvalue_reference_t
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: note: existing
declaration ‘using iter_rvalue_reference_t =
std::ranges::__cust_imove::_IMove::__type<_Tp&>’
146 | using iter_rvalue_reference_t
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error:
conflicting global module declaration ‘using iter_reference_t = decltype (*
declval<const _In&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing
declaration ‘using iter_reference_t = decltype (* declval<const _In&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error:
conflicting global module declaration ‘using __type = typename
std::ranges::__cust_imove::_IMove::__result<const _In&>::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing
declaration ‘using __type = typename
std::ranges::__cust_imove::_IMove::__result<const _In&>::type’
120 | using __type = typename __result<_Tp>::type;
| ^~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: error:
conflicting global module declaration ‘using iter_rvalue_reference_t =
std::ranges::__cust_imove::_IMove::__type<const _In&>’
146 | using iter_rvalue_reference_t
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: note: existing
declaration ‘using iter_rvalue_reference_t =
std::ranges::__cust_imove::_IMove::__type<const _In&>’
146 | using iter_rvalue_reference_t
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/string_view:41,
of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48,
included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error:
conflicting global module declaration ‘using iter_reference_t = decltype (*
declval<_Iter&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from
/opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71,
from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65,
from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
from /opt/gcc-11/include/c++/11.0.0/ios:40,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing
declaration ‘using iter_reference_t = decltype (* declval<_Iter&>())’
76 | using iter_reference_t = decltype(*std::declval<_Tp&>());
| ^~~~~~~~~~~~~~~~
In file included from /opt/gcc-11/include/c++/11.0.0/string:55,
from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
from /opt/gcc-11/include/c++/11.0.0/ios:42,
from /opt/gcc-11/include/c++/11.0.0/ostream:38,
from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:97:20: note: during load of
binding ‘std::reverse_iterator’
97 | typedef std::reverse_iterator<const_iterator>
const_reverse_iterator;
| ^~~~~~~~~~~~~~~~
/opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:6054:65: internal compiler
error: tree check: expected binding_vector, have overload in
maybe_record_mergeable_decl, at cp/name-lookup.c:3562
6054 | const basic_string<_CharT, _Traits, _Alloc>& __rhs)
| ^
0x82be1c tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9810
0x6a4762 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3338
0x6a4762 maybe_record_mergeable_decl
../../gcc/cp/name-lookup.c:3562
0x6a4762 do_pushdecl
../../gcc/cp/name-lookup.c:3864
0xa39a21 do_pushdecl
../../gcc/cp/name-lookup.c:4881
0xa39a21 do_pushdecl_with_scope
../../gcc/cp/name-lookup.c:4881
0xa39c85 pushdecl_namespace_level(tree_node*, bool)
../../gcc/cp/name-lookup.c:6245
0xad9c02 push_template_decl(tree_node*, bool)
../../gcc/cp/pt.c:6049
0x97ac4c start_preparsed_function(tree_node*, tree_node*, int)
../../gcc/cp/decl.c:16406
0x98f79f start_function(cp_decl_specifier_seq*, cp_declarator const*,
tree_node*)
../../gcc/cp/decl.c:16743
0xa7f77f cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/cp/parser.c:29800
0xa7f77f cp_parser_init_declarator
../../gcc/cp/parser.c:21560
0xa85b4b cp_parser_single_declaration
../../gcc/cp/parser.c:30424
0xa85cb6 cp_parser_template_declaration_after_parameters
../../gcc/cp/parser.c:29996
0xa86460 cp_parser_explicit_template_declaration
../../gcc/cp/parser.c:30262
0xa88ba9 cp_parser_declaration
../../gcc/cp/parser.c:14006
0xa88159 cp_parser_toplevel_declaration
../../gcc/cp/parser.c:14104
0xa88159 cp_parser_declaration_seq_opt
../../gcc/cp/parser.c:13892
0xa885f2 cp_parser_namespace_body
../../gcc/cp/parser.c:20392
0xa885f2 cp_parser_namespace_definition
../../gcc/cp/parser.c:20370
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.