patchGNU Autoconf Archive - Patches: patch #8714, Unified AX_CXX_COMPILE_STDCXX_11...

 
 

patch #8714: Unified AX_CXX_COMPILE_STDCXX_11 and AX_CXX_COMPILE_STDCXX_14 Macros

Submitter:  Moritz Klammler <moritz_klammler>
Submitted:  Tue 11 Aug 2015 02:19:53 AM UTC
 
Priority:  5 - Normal Status:  Done
Assigned to:  simons Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Mon 23 Nov 2015 10:51:36 AM UTC, comment #4: 

I've pushed these patches in commit 3a8480edb2e6784f3d8f7e6e0b4181e70c626af0. Thank you very much for your efforts!

Peter Simons <simons>
Project Administrator
Fri 02 Oct 2015 11:48:56 AM UTC, comment #3: 

Thank you for looking into this, Peter, and sorry for not replying so long.

I have re-based my changes onto the latest (serial #13) version of the `AX_CXX_COMPILE_STDCXX_11` and applied your other remarks as well.  The Python script does not complain any more now.  BTW, are these requirements documented somewhere?

I left the credit for the original authors in the `AX_CXX_COMPILE_STDCXX_11` file for historic notice although the file doesn't contain any of their code any more.

Please see the commit log for a more detailed description.

(file #35033, file #35034)

Moritz Klammler <moritz_klammler>
Fri 25 Sep 2015 10:52:12 AM UTC, comment #2: 

Ping? Are you still interested in merging these changes into the archive?

Peter Simons <simons>
Project Administrator
Wed 26 Aug 2015 09:55:22 AM UTC, comment #1: 

The name of the _AX_CXX_COMPILE_STDCXX_GENERIC_IMPL macro doesn't match the name of the file it's in. Basically, I'd drop the leading underscore. Also, the macro lacks the usual documentation header that all other macros have.

A simple way to check whether your code satisfies the formal constraints is to run "make maintainer-all all" in your checked-out copy of the repository.

If you have a github account, you can also open a pull request for https://github.com/peti/autoconf-archive; this will automatically verify your changes with Travis-CI.

Peter Simons <simons>
Project Administrator
Tue 11 Aug 2015 02:19:53 AM UTC, original submission:  

I find the `AX_CXX_COMPILE_STDCXX_11` macro very useful and have used it a lot in the past.  Today, I wanted to use C++14 features and found that there was no macro in the archive yet that would allow me to check for them, so I started writing one.

Checking for a specific version of C++ should offer the same interface for all versions and be using the same logic so I have factored the common logic out of `AX_CXX_COMPILE_STDCXX_11` and created a new internal macro `_AX_CXX_COMPILE_STDCXX_GENERIC_IMPL` (in the file `ax_cxx_compile_stdcxx_generic_impl.m4`) that accepts an additional parameter -- the version of the standard.  This was very straight-forward because `AX_CXX_COMPILE_STDCXX_11` already separated M4 and C++ code.

There is also a code-sharing opportunity at the C++ level.  Since C++14 is a strict superset of C++11, I found that it would be best to use all the code for the C++11 check and then some code specific for C++14 if checking for the latter.  For this, I have defined the two macros `_AX_CXX_COMPILE_STDCXX_testbody_new_in_11` and `_AX_CXX_COMPILE_STDCXX_testbody_new_in_14` (also in the file `ax_cxx_compile_stdcxx_generic_impl.m4`).

While doing this, I have also added more C++11 checks, introduced a consistent style and tried to check one feature at a time with hopefully self-explanatory checks.  To speed up the checks, I have wrapped the test code into `#if __cplusplus >= ...` blocks.  I hope this was a good idea.

The new macros work fine for me but I'm not sure whether the splitting into multiple macro files and the documentation of the internal `ax_cxx_compile_stdcxx_generic_impl.m4` file is in accordance with the rules for the macro archive.  I could put all the code into a single file but then I would violate the "one file per macro" rule unless I'd expose the generic macro that accepts the language version as a parameter.  But doing so would leave duplicated functionality in the existing `AX_CXX_COMPILE_STDCXX_11` macro.  There also is `AX_CXX_COMPILE_STDCXX_0X` which I thought would be an alias for `AX_CXX_COMPILE_STDCXX_11` but it isn't.  What should we do about this macro?

I'd be glad if somebody more acquainted with the rules of the macro archive could review my submission and tell me what to do in order to get it accepted.

Moritz Klammler <moritz_klammler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35033:  0001-unify_ax_cxx_compile_stdcxx_macros.patch.gz added by moritz_klammler (6KiB - application/gzip - Gzipped git-format-patch and my OpenPGP signature for it)
file #35034:  0001-unify_ax_cxx_compile_stdcxx_macros.patch.gz.sig added by moritz_klammler (473B - application/pgp-signature - Gzipped git-format-patch and my OpenPGP signature for it)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by moritz_klammler (Submitted the item)
  • -email is unavailable- added by moritz_klammler (I have put you on the CC list because you are listed as authors / contributors of the AX_CXX_COMPILE_STDCXX_11 macro.)
  • -email is unavailable- added by moritz_klammler (I have put you on the CC list because you are listed as authors / contributors of the AX_CXX_COMPILE_STDCXX_11 macro.)
  • -email is unavailable- added by moritz_klammler (I have put you on the CC list because you are listed as authors / contributors of the AX_CXX_COMPILE_STDCXX_11 macro.)
  • -email is unavailable- added by moritz_klammler (I have put you on the CC list because you are listed as authors / contributors of the AX_CXX_COMPILE_STDCXX_11 macro.)
  •  

     

     

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-29 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2015-11-23 simons Assigned toNone simons
    2015-11-23 simons StatusIn Progress Ready For Test
    2015-10-02 moritz_klammler Attached File- Added 0001-unify_ax_cxx_compile_stdcxx_macros.patch.gz, #35033
        Attached File- Added 0001-unify_ax_cxx_compile_stdcxx_macros.patch.gz.sig, #35034
    2015-08-26 simons StatusNone In Progress
    2015-08-11 moritz_klammler Attached File- Added ax_cxx_compile_stdcxx_11.m4, #34622
        Attached File- Added ax_cxx_compile_stdcxx_generic_impl.m4, #34623
        Attached File- Added ax_cxx_compile_stdcxx_14.m4, #34624
        Carbon-Copy- Added "alexey sokolov"
        Carbon-Copy- Added "roy stogner"
        Carbon-Copy- Added "zack weinberg"
        Carbon-Copy- Added "benjamin kosnik"

    Back to the top


    Powered by Savane 3.9