[LLVMbugs] [Bug 19460] New: Unable to detect operator>> (extraction operator) using libc++
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 16 22:10:12 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19460
Bug ID: 19460
Summary: Unable to detect operator>> (extraction operator)
using libc++
Product: libc++
Version: 3.4
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: lachlan.hetherton at csiro.au
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
Created attachment 12390
--> http://llvm.org/bugs/attachment.cgi?id=12390&action=edit
Test file: compile this to reproduce the issue.
We have been using some code for a number of years now to detect whether the
streaming operators (operator<< and operator>>) exist on a given class. I've
recently updated one of our machines to OSX 10.9, which uses Clang 3.4 and
libc++ by default, and now our operator>> detection code no longer compiles. If
I explicitly enable libstdc++ however, it still compiles.
It may well be that our code no longer meets a new stringent requirement of the
c++11 standard (keep in mind that we're not yet targeting this: -std=c++11 is
not enabled), and if so, please feel free to point out my glaring error!
I've attached a very cut-down example of the affected code. To reproduce the
issue:
1) Compile the attached cpp file with clang++ v3.4 as follows:
clang++ extraction_test.cpp
2) You'll notice that it fails. To confirm that it works with the stdc++
library, compile as follows:
clang++ -stdlib=libstdc++ extraction_test.cpp
I apologise if this is something new and / or obvious - I'm new to compiling on
anything other than GCC / MSVC, but I thought it best to raise this issue in
case there was a genuine problem in the new libc++ library that may affect
others trying to implement this kind of functionality.
Regards,
Lachlan Hetherton
--
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/20140417/a6cb0fcf/attachment.html>
More information about the llvm-bugs
mailing list