https://bugs.llvm.org/show_bug.cgi?id=37846

            Bug ID: 37846
           Summary: type of const member function
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: zhong...@pku.org.cn
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

ypeid reports void() and void()const as the same type:

#include <typeinfo>
#include <iostream>
template<class A,class B> void f(){
        std::cout << std::boolalpha << (typeid(A)==typeid(B)) << '\n';
}
int main(){
        f<void()const,void()>();
}

The demangler in binutils prints void()const as void( const)(). The code comes
from a gcc bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

The programmers of gcc add an error message for this code. Shall clang++ also
add such error messages?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to