[Bug c++/118834] New: __is_same diagnostic can be more specific
egor.pugin at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Feb 11 10:57:28 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118834
Bug ID: 118834
Summary: __is_same diagnostic can be more specific
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: egor.pugin at gmail dot com
Target Milestone: ---
Consider https://godbolt.org/z/rEvo8v88P
===
#include <cstdint>
#include <string>
static_assert(__is_same(std::int64_t,
decltype(std::stoll(std::string{}))));
static_assert(__is_same(long,
long long));
static_assert(std::same_as<std::int64_t,
decltype(std::stoll(std::string{}))>);
===
Gcc gives
<source>:4:15: error: static assertion failed
where clang says
<source>:4:15: error: static assertion failed due to requirement
'__is_same(long, long long)'
More information about the Gcc-bugs
mailing list