Re: [patch #8613] Simplify _AX_CXX_COMPILE_STDCXX_11_testbody

Matan Nassau <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <CAATngTM=PLrHAf0PUdgr6HU1DAs_DLY=FD=655Rt2oVk84aNxw@mail.gmail.com>
But here we are talking about a standard's version, not an implementation's
version. A standard's version equals precisely what you should expect from
an implementation...
On Sun, Mar 1, 2015 at 16:57 Peter Johansson <[email protected]> wrote:

> Hi,
>
> On 02/28/2015 03:25 AM, anonymous wrote:
> > IIUC the _AX_CXX_COMPILE_STDCXX_11_testbody macro from
> > m4/am_cxx_compile_stdcxx_11.m4 tests for C++11 conformance via a number
> of
> > C++11 tricks. I think it would be simpler to just test the __cplusplus
> macro
> > against its C++11 value.
> >
> >
> > static_assert(__cplusplus >= 201103L, "C++11?");
> >
> >
> > I reckon GCC had an issue with this macro for a very long time, but IIUC
> it's
> > now resolved, and we can rely on it at least for values greater or equal
> to
> > that of C++11.
> >
> > I also think this change would make it easier to support checking for
> newer
> > standards, like checking for the compliance of C++14. Its value for
> > __cplusplus is 201402L, so it would be as simple as changing the static
> assert
> > for that.
>
> It's up to the maintainer what he wanna do with the macro, but I just
> wanna mention that it's the Autoconf philosophy to rather check features
> than version number etc. The latter are proxies of the former, but
> unfortunaley they can often be quite inaccurate proxies.
>
> Cheers,
> Peter
>
> --
> Peter Johansson
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.