[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] Extend AC_PROG_CXX to check for standards conformance

From: Roger Leigh
Subject: Re: [patch] Extend AC_PROG_CXX to check for standards conformance
Date: Tue, 22 Jan 2013 20:07:01 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jan 21, 2013 at 10:38:15PM -0800, Paul Eggert wrote:
> On 01/21/2013 12:36 PM, Roger Leigh wrote:
> > For C stuff like
> > const/restrict/volatile/inline, it's possible to achieve this
> > fairly simply, and autoconf does a very good job here.
> > 
> > However, if you look at the C++11 features like declspec,
> > automatic type inference, array initialisers, delegate
> > constructors, range-based for loops, lambdas, etc. these
> > features can not be substituted for.
> On 01/21/2013 04:01 PM, Miles Bader wrote:
> > If you need C++11 features and don't have any compatibility fallbacks,
> > isn't following the autoconf language test in by
> > "if not c++11 then AC_ERROR([BARF! Need a C++11 compiler!])"  good
> > enough?

That would probably satisfy my own particular use case sufficiently.

Please find attached a reworked and simplified patch.  This patch
adds no user-visible macros, and removes the TR1 checks which can
be done simply enough by the user.  This means it will check for
only C++11 and C++98.  We have the specific ac_cv_prog_cxx_cxx11
and ac_cv_prog_cxx_cxx98 which are both set to no if unavailable,
exactly like for C, and these can be checked to see if the
compiler satisfies your requirements.

Hope that's all OK with you.


  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux
 `. `'   schroot and sbuild
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800

Attachment: 0001-AC_PROG_CXX-Add-checks-for-C-11-C-98TR1-and-C-98.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]