State of C++11 standard support in libc++?
Asked Answered
T

2

5

Is there a good source of information on C++11 standard support in libc++? Its web site says 98% of the standard is supported but I'd like to know what features the other 2% are.

Something similar to this list for libstdc++ would be nice: http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011

Tobacconist answered 27/7, 2012 at 4:22 Comment(3)
Which library are you talking about? libc++ (from LLVM/Clang) or libstdc++ (from GNU)?Minify
Uhm.. it takes a few seconds to find it in google... the clang page has links to libc++, and the linked page mentions that the major missing piece is <atomic>... a graph shows that there are also a few utilities that are not yet fully compliant.Rosemaria
for gcc look at gcc.gnu.org/onlinedocs/libstdc++/manual/…Carolynecarolynn
G
5

Edit: From Howard Hinnant's comment below:

The chart is outdated already. I should update it or take it down. The only thing unimplemented in libc++ right now is 20.7.2.5 shared_ptr atomic access [util.smartptr.shared.atomic]. And I hope to get that done this weekend. [atomics] is there now. Oh, quick_exit is missing. I'm going to let the C library implement that.


The most recent and detailed information is already linked from the front page (doesn't mean it is new enough ☺).

The only major missing piece of C++'0x support is <atomic>.

Here is a by-chapter breakdown of what is passing tests and what isn't.

enter image description here

We can see that 76% of <atomic>, 3% of "[language.support]" and 2% of "[utilities]" are missing.

I don't think there would be more updated/detailed break down like the libstdc++ one.

Gauguin answered 27/7, 2012 at 11:21 Comment(7)
This is very old information. I would highly doubt its accuracy, as Clang was recently improved very much in the <atomic> department. Check the test suite in the atomics department, run it (I can't, I don't have a Mac) and see for yourself. I ran the test suite on a thrown together setup on Windows, and all Atomics tests pass with Clang built on MinGW-w64. This obviously does not mean you can use libc++ with Clang on Windows :(Romaic
While I really like this answer, the graph is (hopefully) going to become outdated quickly. Then again, so is the question...Cola
The chart is outdated already. I should update it or take it down. The only thing unimplemented in libc++ right now is 20.7.2.5 shared_ptr atomic access [util.smartptr.shared.atomic]. And I hope to get that done this weekend. [atomics] is there now. Oh, quick_exit is missing. I'm going to let the C library implement that.Wergild
@HowardHinnant: You should make that an answer :)Gauguin
@KennyTM: I upvoted yours instead. It was easier and saved me time. :-)Wergild
Great, this is what I wanted to know.Tobacconist
[util.smartptr.shared.atomic] is checked into trunk.Wergild
O
5

A frustrating side note on std::quick_exit() and std::at_quick_exit() functions. They are still unimplemented in macOS's libc even after several years. Also there is a possible vulnerability in the C++ standard, where it states you can safely call std::quick_exit() from a signal handler, but it doesn't state the functions that are registered by std::at_quick_exit() must also meet the same requirements a regular signal handler does. I believe that might be the reason behind why those functions are not implemented yet.

Ogilvy answered 2/3, 2020 at 20:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.