Re: [patch #8613] Simplify _AX_CXX_COMPILE_STDCXX_11_testbody

Matan Nassau <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <CAATngTOucwmHga_8rREqYvYMX5VtdNE8A+W6pz31R2Q3kwNovQ@mail.gmail.com>
The value is in removing lines of code while maintaining correctness.

If you find now a compiler in the wild that violates the standard with
regard to this define then you can prepend a check against that compiler. I
think you'd still win in terms of code removed. We're talking here about a
check for C++11: There's a standard-conforming, idiomatic way to do that,
that as a bonus is short, simple, and fast.

I think that if a check for support for double right-angle in a template
line is useful, it should be served as a dedicated macro. If a check for
support for && is useful, it should be served as a dedicated macro. But
even then, a macro that checks for C++11 can do its thing without
aggregating all these dedicated little packages for specific C++11
features. It can do its thing with less code and less work than that.


Matan

On Wed, Aug 26, 2015 at 4:27 AM Peter Simons <[email protected]>
wrote:

> Follow-up Comment #4, patch #8613 (project autoconf-archive):
>
> I tend to agree with Peter Johansson in so far that Autoconf traditionally
> checks whether certain features work by *trying them* rather than by
> looking
> at the compiler version, etc. The advantage of these practical tests is
> that
> they tend to produce reliable results for any kind of compiler, whereas the
> latter approach works only for compilers that are known to the macro.
>
> Now, I realize that your patch doesn't suffer from that disadvantage,
> because
> it uses a well known CPP define rather that a list of known compilers.
> Still,
> it's vulnerable to compilers declaring that define incorrectly.
>
> All things considered, I don't quite see what value this refactoring adds.
> If
> there were a specific use case that works with the new code but didn't work
> with the old code, then it would be fine IMHO to put the philosophical
> issue
> aside. I'm just not aware of any such concrete benefits from applying this
> patch?
>
>     _______________________________________________________
>
> Reply to this item at:
>
>   <http://savannah.gnu.org/patch/?8613>
>
> _______________________________________________
>   Message sent via/by Savannah
>   http://savannah.gnu.org/
>
>
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.