[Bug c++/126966] New: feature-test- macros __cpp_lib_constexpr_cmath and __cpp_lib_constexpr_complex not work

"gero.peterhoff at gmx dot net via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126966

            Bug ID: 126966
           Summary: feature-test- macros __cpp_lib_constexpr_cmath and
                    __cpp_lib_constexpr_complex not work
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gero.peterhoff at gmx dot net
  Target Milestone: ---

int main()
{
#if defined(__cpp_lib_constexpr_cmath)
    std::cout << (__cpp_lib_constexpr_cmath) << "\n";
#else
    std::cout << "no define math\n";
#endif

#if defined(__cpp_lib_constexpr_complex)
    std::cout << (__cpp_lib_constexpr_complex) << "\n";
#else
    std::cout << "no define complex\n";
#endif
}

if you compile with -std=c++23 or -std=gnu++23 or above gets always 

no define math
no define complex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.