Diego Sevilla
Diego Sevilla

Reputation: 29001

User-defined literals (Extended literals) of C++11... which compilers support it?

In another thread I introduced some techniques we would use for Model-Driven-Development in C++ once C++11 features, in particular user-defined literals, are available. I just revised the plans for GCC 4.5 and even 4.6 and it shows that this particular feature is not supported.

Anyway, do you know if I even have any compiler to test that feature to start designing/implementing the algorithms till the C++11 is approved and implemented in mainstream free compilers (LLVM, GCC)?

Upvotes: 3

Views: 817

Answers (3)

wjl
wjl

Reputation: 7735

GCC 4.7 (unreleased as of this posting) supports user-defined literals. For reference see http://gcc.gnu.org/gcc-4.7/changes.html and http://gcc.gnu.org/gcc-4.7/cxx0x_status.html .

Judging just from past GCC release timelines, I guess GCC 4.7 will be released sometime before May 2012.

You can use it right away if you want: I'm using a GCC 4.7 SVN snapshot right now specifically to play with user-defined literals and some other newly implemented C++11 features. They are working very well and I expect to use them in earnest when GCC 4.7 is released.

Upvotes: 1

ohmantics
ohmantics

Reputation: 1819

Not yet, although patches for both Clang and GCC have been submitted and rejected for reworking, so you should see something soon.

Upvotes: 2

towi
towi

Reputation: 22267

None yet, as far as I know.

Upvotes: 1

Related Questions