https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65509
Bug ID: 65509
Summary: [C++11] GCC rejects operator== with two distinct
pointers as not constexpr
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kariya_mitsuru at hotmail dot com
Created attachment 35091
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35091&action=edit
g++ -v
The sample code below should be compiled successfully but gcc 5.0 rejects it.
================= sample code =================
constexpr int i1 = 1;
constexpr int i2 = 2;
constexpr auto b = &i1 == &i2;
int main() {}
================= sample code =================
cf. http://melpon.org/wandbox/permlink/1Ae9Blr93vcU9qKQ
Note that gcc 4.9.2 accepts it.
cf. http://melpon.org/wandbox/permlink/72exRtJrkijS9D8u