https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102551

            Bug ID: 102551
           Summary: Failing compile-time comparison of std::type_info
                    addresses
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

The following valid code is rejected by GCC:
```
#include <typeinfo>

int main() {
    constexpr auto v1 = &typeid(int);
    constexpr auto v2 = &typeid(char);
    static_assert( v1 != v2 );
} 
```
Demo: https://gcc.godbolt.org/z/eexj7vcPG

Reply via email to