Skip to content

compiler error gcc with import std #420

@MedvedMaeru

Description

@MedvedMaeru

In file included from /opt/gcc-16/include/c++/16.0.1/cerrno:46,
from /Development/misbuild/3rdparty/argparse/argparse.hpp:33,
from /Development/misbuild/3rdparty/argparse/argparse.cppm:47:
/opt/gcc-16/include/c++/16.0.1/aarch64-unknown-linux-gnu/bits/c++config.h:355:15: error: redefinition of 'void std::__terminate()'
355 | inline void __terminate() _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~~~~
In file included from /opt/gcc-16/include/c++/16.0.1/cctype:46,
from /opt/gcc-16/include/c++/16.0.1/aarch64-unknown-linux-gnu/bits/stdc++.h:33,
from /opt/gcc-16/include/c++/16.0.1/bits/std.cc:26,
of module std, imported at /Development/misbuild/3rdparty/argparse/argparse.cppm:41:
/opt/gcc-16/include/c++/16.0.1/aarch64-unknown-linux-gnu/bits/c++config.h:355:15: note: 'void std::__terminate()' previously defined here
355 | inline void __terminate() _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~~~~
/opt/gcc-16/include/c++/16.0.1/aarch64-unknown-linux-gnu/bits/c++config.h:588:3: error: redefinition of 'constexpr bool std::__is_constant_evaluated()'
588 | __is_constant_evaluated() _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/opt/gcc-16/include/c++/16.0.1/aarch64-unknown-linux-gnu/bits/c++config.h:588:3: note: 'constexpr bool std::__is_constant_evaluated()' previously defined here
588 | __is_constant_evaluated() _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~
with have compiler error on gcc ARGPARSE_MODULE_USE_STD_MODULE
could rresolve it by replace
#include <cerrno> on #include "errno.h"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions