[llvm-bugs] [Bug 37846] New: type of const member function
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 19 01:43:35 PDT 2018
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: unassignedclangbugs at nondot.org
Reporter: zhonghao at pku.org.cn
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180619/6b7ece35/attachment.html>
More information about the llvm-bugs
mailing list