autoconf
[Top][All Lists]
Advanced

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

Re: [PATCH] C++11 keyword fallback


From: Miles Bader
Subject: Re: [PATCH] C++11 keyword fallback
Date: Mon, 04 Feb 2013 17:51:01 +0900

Paul Eggert <address@hidden> writes:
> but would his comments be addressed by Autoconf macros that
> cause config.h to #define HAVE_CONSTEXPR rather than #defining
> constexpr, etc.?  Or would that just be too awkward?  I guess
> I don't know the usage scenario here.


Sure, that would work too.

configure.ac:
  AC_CXX_FINAL()
my-common-header.h:
  #if HAVE_FINAL
  # define MY_PKG_FINAL final
  #else
  # define MY_PKG_FINAL
  #endif

[My suggestions was just to have autoconf do that stuff too, and it
seems likely that in most cases people would want this.  Even if
autoconf does, it's probably good to advertise the HAVE_... macro
anyway, in case some more complicated action is needed.]

The only crucial bit is that autoconf shouldn't be defining the
standard identifiers.

[The same is true of "const" in many cases as well (it can effect
overloading etc, in a way that means it can't simply be turned into a
nop), but I expect these days pretty much every significant compiler
supports const anyway, so the autoconfiscation never actually does
anything in practice...]

-miles

-- 
Somebody has to do something, and it's just incredibly pathetic that it
has to be us.  -- Jerry Garcia



reply via email to

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