libc++ headers include debug header in Xcode 6.3 10.10 SDK/CLT packages

Originator:mistydemeo
Number:rdar://20503249 Date Originated:10-Apr-2015
Status:Closed Resolved:
Product:Developer Tools Product Version:6.3.0.0.1.1428348375
Classification: Reproducible:Yes
 
Summary:
In the Xcode 6.3 version of the OS X 10.10 SDK, and in the Command Line Tools for Xcode 6.3 package, many headers in libc++ unconditionally #include <__debug>. Because the __debug header is not included with the shipped headers, it is not possible to build C++ software which uses these headers.

Affected headers are:

__hash_table
algorithm
experimental/optional
experimental/string_view
iterator
list
string
unordered_map
unordered_set
vector

In Xcode 6.2, the __debug #include statement was conditional on #ifdef _LIBCPP_DEBUG, but in Xcode 6.3 they are unconditional.

Steps to Reproduce:
1. Create a file named test.cpp with the following contents:
#include <iterator>

int main() {}

2. Run: clang++ test.cpp -o test

Expected Results:
The test program compiles.

Actual Results:
clang++ fails with the following error:

In file included from test.cpp:1:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
         ^
1 error generated.

Version:
Command Line Tools 6.3.0.0.1.1428348375
ProductVersion:	10.10.3
BuildVersion:	14D131

Notes:


Configuration:
Tested on OS X 10.10.3 using the Command Line Tools for Xcode 6.3; I can also confirm this occurs on OS X 10.10.3 with Xcode 6.3.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!