From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: C++1x support? Date: Fri, 04 Dec 2009 01:13:19 -0500 Message-ID: <4B18A87F.4000405@censorshipresearch.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259909144 9212 80.91.229.12 (4 Dec 2009 06:45:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Dec 2009 06:45:44 +0000 (UTC) To: Emacs development discussions , bug-cc-mode@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 04 07:45:37 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGRv6-0006ri-3R for ged-emacs-devel@m.gmane.org; Fri, 04 Dec 2009 07:45:36 +0100 Original-Received: from localhost ([127.0.0.1]:45554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGRv5-0007Dl-Me for ged-emacs-devel@m.gmane.org; Fri, 04 Dec 2009 01:45:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGRQ8-0002A1-Hz for emacs-devel@gnu.org; Fri, 04 Dec 2009 01:13:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGRQ6-00027p-Gv for emacs-devel@gnu.org; Fri, 04 Dec 2009 01:13:34 -0500 Original-Received: from [199.232.76.173] (port=45087 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGRQ5-00027Q-U8 for emacs-devel@gnu.org; Fri, 04 Dec 2009 01:13:33 -0500 Original-Received: from haystack.austinheap.com ([70.32.98.68]:47511 helo=haystacknetwork.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGRQ3-00047W-CG; Fri, 04 Dec 2009 01:13:31 -0500 User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) X-Enigmail-Version: 0.96.0 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118238 Archived-At: -----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 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-----