C++11 on Mountain Lion and lower?
Chris Jones
jonesc at hep.phy.cam.ac.uk
Wed Dec 4 03:56:33 PST 2013
On 04/12/13 11:48, Titus von Boxberg wrote:
> Am 04.12.2013 11:00, schrieb Chris Jones:
>> Hi,
>>
>> On OSX Macports explicitly links using the libc++ runtime, where as on
>> older releases it
>>
>> This is exactly why c++11 code is fine on OSX10.9, as the default
>> compiler libc++ used there supports it, but not on older OSC releases.
>> This is why the c++ issue and OSX versions are mixed up here.
> As said, this is where the mix up of the issues gets a bit incorrect.
>
> libc++ is available since 10.7.
> clang is available from Apple way before Xcode 5.
>
> It's just that the libc++ of 10.9 and clang of Xcode 5
> are the first versions by Apple that have had a chance
> to use the clang/libc++ that has (or claims to have)
> full C++11 support (actually, I don't know
> if that's really the case since I don't have 10.9/Xcode 5).
>
> When sticking to C++03 or at most the subset of C++11
> that had already been implemented when 10.7.x shipped
> (which most ports currently do, I think),
> macports should work with libc++ on the three most recent
> OSX versions.
> (However, I didn't test that assumption, so I don't know
> if that's really correct from 10.7 onwards.)
That though is not really a robust definition that can be used in
practise I think. A compiler that only implements some parts of the
C++11 standard, doesn't implement the standard. Just saying "yeah, it
might work, as long as upstream only happen to use the parts of the
standard our compilers implement" is fragile and not going to work for long.
If we are going to go the the effort of getting support for c++11 on
systems <10.9, the aim should be *full* support, or sooner or later the
same issue will come up again. Partial support just postpones the problem.
Chris
More information about the macports-dev
mailing list