https://llvm.org/bugs/show_bug.cgi?id=31229
Bug ID: 31229 Summary: ambiguous operator<< for c++11 enum of type bool Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++11 Assignee: unassignedclangb...@nondot.org Reporter: vik.kiri...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified The following code does not compile with any clang version I have tested: #include <iostream> enum A : bool { Yup = true, Nop = false, }; int main() { A t = Yup; std::cout << t; } This is the error: error: use of overloaded operator '<<' is ambiguous (with operand types 'ostream' (aka 'basic_ostream<char>') and 'A') Here is a link to an online compiler: http://melpon.org/wandbox/permlink/YtTxiYfVsmJR16Ih This issue is non-existent with gcc. Hope this is not a duplicate... first bug report here. -- 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