From plummerm at iarc.fr  Thu Apr 10 17:58:47 2014
From: plummerm at iarc.fr (Martyn Plummer)
Date: Thu, 10 Apr 2014 15:58:47 +0000
Subject: [Rd] R 3.1.0 and C++11
In-Reply-To: <CAP01uRnkS7YM3i5sJOAhfF3V4t-ZsMuXGFB2ViFQc_FTYwhegw@mail.gmail.com>
References: <21073.63553.888272.510490@max.nulle.part>
	<31E214B6DF75104E942856C2F74953CB0505C0F9@exchange>
	<21075.11278.577153.103691@max.nulle.part>
	<CAMi=pg5aRiFG7s+f4bERE6QQe+D7dH1Y_b9Q6AsH3A7Gz0M-qw@mail.gmail.com>
	<478ce69b232b57db8fa74fa93e5a646a@r-enthusiasts.com>
	<CAP01uRnkS7YM3i5sJOAhfF3V4t-ZsMuXGFB2ViFQc_FTYwhegw@mail.gmail.com>
Message-ID: <1397145527.11062.8.camel@braque.iarc.fr>

On Thu, 2014-04-10 at 11:14 -0400, Gabor Grothendieck wrote:
> On Tue, Oct 29, 2013 at 1:58 AM,  <romain at r-enthusiasts.com> wrote:
> > Le 2013-10-29 03:01, Whit Armstrong a ?crit :
> >
> >> I would love to see optional c++0x support added for R.
> >
> >
> > c++0x was the name given for when this was in development. Now c++11 is a
> > published standard backed by implementations by major compilers.
> > people need to stop calling it c++0x
> >
> >
> >> If there is anything I can do to help, please let me know.
> >
> >
> > Come here https://github.com/romainfrancois/cpp11_article where I'm writing
> > an article on C++11 and what would be the benefits.
> >
> 
> Unless you are willing to do it yourself currently Rtools on Windows uses
> g++ 4.6.3 and that requires that one specify -std=c++0x or -std=gnu++0x .
> 
> Ubuntu 12.04 LTS also provides g++ 4.6.3.
> 
> g++ 4.7 is the first version of g++ that accepts -std=c++11 or -std=gnu++11
> 
> More info at:
> http://gcc.gnu.org/projects/cxx0x.html

The R configure script is permissive and will enable "C++11" support if
your compiler accepts -std=c++0x. Obviously you will only get partial
support for the C++11 standard (But this is also true of some compilers
that accept -std=c++11). You may be OK if you just want C99 features,
which were missing from the C++98 standard, and features previously
introduced in the TR1 extension. But there are no guarantees.

Cross-platform support for C++11 is going to remain poor for some time
to come, I'm afraid.

Martyn
-----------------------------------------------------------------------
This message and its attachments are strictly confidenti...{{dropped:8}}



[Rd] R 3.1.0 and C++11
Martyn Plummer