unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C++1x support?
@ 2009-12-04  6:13 Daniel Colascione
  0 siblings, 0 replies; only message in thread
From: Daniel Colascione @ 2009-12-04  6:13 UTC (permalink / raw)
  To: Emacs development discussions, bug-cc-mode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

With upcoming versions of gcc and the-compiler-which-shan't-be-named
supporting huge swaths of the next C++ standard, it's probably
worthwhile to start talking about how to support it.

I've made a short of the things that do and don't work with the current
cc-mode.

Is anyone working on these?


WHAT WORKS:
rvalue references (which are spelled with double ampersands) are fine.

user-defined literals and most new string prefixes work fine.

range-based for loops are fontified correctly as far as I can tell.

Amazingly, lambas seem to work (though the new-style return type
specification isn't fontified properly: that is, in

[](int x,
   int y,
   int z) -> obj
    {
        int z = x + y; return z + x;
    }

obj should be fontified as a type.)




WHAT DOESN'T WORK:

New Keywords:
There are new keywords constexpr, nullptr, static_assert, and decltype,
but adding those should be trivial.


New template parsing rules:
'>>' now being parsed as a template argument list ender instead of a
right shift


Type inference:
auto x = somefunction(); // compiler infers type of x

cc-mode highlights x as a type.


Variadic templates:
template<typename... Args> void printf(const char* fmt, Args... args);

cc-mode copes with the function arguments, but it just gives up on the
template arguments. Also, forward-sexp doesn't move over 'Args...': it
stops before the dots.


New strings:
I have a feeling this one might be painful. C++0x has raw strings:
(from Wikipedia)

u8R"XXX[I'm a "raw UTF-8" string.]XXX"
uR"*@[This is a "raw UTF-16" string.]*@"
UR"[This is a "raw UTF-32" string.]"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAksYqH8ACgkQ17c2LVA10VuD8gCgpGdJPc9iHiN3TwyRiWYH9UGY
U7gAn2aA8krugJ5NeNS5Sp5V38CC62+E
=0hgf
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-04  6:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04  6:13 C++1x support? Daniel Colascione

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).