Skip to content

trunk fails to #include <string> #140934

@scarf005

Description

@scarf005

Reproduction

#include <string> 

https://godbolt.org/z/Kbaj8Mv6j
with flag -std=c++20 fails with:

In file included from <source>:1:
In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/16.0.0/../../../../include/c++/16.0.0/string:57:
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/16.0.0/../../../../include/c++/16.0.0/bits/basic_string.tcc:633:12: error: variable has incomplete type 'void'
  633 |       auto __r = std::move(__op)(__p + 0, __n + 0);
      |            ^
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/16.0.0/../../../../include/c++/16.0.0/bits/basic_string.h:4831:7: note: in instantiation of function template specialization 'std::basic_string<wchar_t>::__resize_and_overwrite<(lambda at /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/16.0.0/../../../../include/c++/16.0.0/bits/basic_string.h:4832:9)>' requested here
 4831 |         __ws.__resize_and_overwrite(__s.size(),
      |              ^
1 error generated.
Compiler returned: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"lambdaC++11 lambda expressionslibstdc++GNU libstdc++ C++ standard libraryregression

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions