Reputation: 927
How can I use the GCC stdlib in XCode 4.5? When I writestd::decimal::decimal128 a;
I get an error because for XCode std
is the Standard C++ Library, not the GCC stdlib.
Any help?
Upvotes: 0
Views: 419
Reputation: 154005
For gcc decimal operation are built into the compiler. The C extension specified by TR 24732 is carried over to C++. Although some of the operations are linked from a library, there isn't in any library you can use from another compiler. Thus, I don't think it would help you to use a different standard library. In general, you can change clang's standard C++ library using the -stdlib=...
option.
At some point there was a public implementation of C++ TR 24733 publically available but it seems not to be accessible at the moment. I'm mildly hopeful that I can provide an open implementation at some point next year but since this is part of my actual work it isn't up to me to decide whether and, if so, when the work can be made available. A basic implementation using, e.g., IBM's decNumber library is fairly straight forward. Doing a complete implementation is a bit of work, though, even when using decNumber.
Upvotes: 1