https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99274

            Bug ID: 99274
           Summary: [modules] Error when compiling some system headers as
                    modules after <iosfwd>
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

Some system headers cannot be compiled as a modules after you compile <ioswfd>
At least <future> and <complex>:
-----
g++ -std=c++20 -fmodules-ts -x c++-system-header iosfwd
g++ -std=c++20 -fmodules-ts -x c++-system-header future
-----
In file included from /usr/local/include/c++/11.0.1/string:43,
                 from /usr/local/include/c++/11.0.1/stdexcept:39,
                 from /usr/local/include/c++/11.0.1/system_error:41,
                 from /usr/local/include/c++/11.0.1/mutex:42,
                 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:156:74: error: wrong number of
template arguments (1, should be 2)
  156 |   template<typename _CharT, typename _InIter =
istreambuf_iterator<_CharT> >
      |                                                                        
 ^
.....

----
g++ -std=c++20 -fmodules-ts -x c++-system-header iosfwd
g++ -std=c++20 -fmodules-ts -x c++-system-header complex
----
In file included from /usr/local/include/c++/11.0.1/ios:41,
                 from /usr/local/include/c++/11.0.1/istream:38,
                 from /usr/local/include/c++/11.0.1/sstream:38,
                 from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/bits/localefwd.h:156:74: error: wrong number of
template arguments (1, should be 2)
  156 |   template<typename _CharT, typename _InIter =
istreambuf_iterator<_CharT> >
      |                                                                        
 ^
In file included from /usr/local/include/c++/11.0.1/bits/specfun.h:45,
                 from /usr/local/include/c++/11.0.1/cmath:1927,
                 from /usr/local/include/c++/11.0.1/complex:44:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template<class _CharT, class _Traits> class std::istreambuf_iterator’
..........
  • [Bug c++/99274] New:... alexander.lelyakin at googlemail dot com via Gcc-bugs

Reply via email to