
On Mar 10, 2012, at 8:44 AM, lcaminiti wrote:
lcaminiti wrote
Stewart, Robert wrote
Marshall Clow wrote:
On Feb 26, 2012, at 10:50 AM, lcaminiti wrote:
I have an aesthetic question. Boost.Algorithm puts C++11 algorithms like all_of into a directory boost/algorithm/cxx11. Would the directory name boost/algorithm/cpp11 be preferred?
I think for file names .cpp and .hpp are Boost choice over .cxx and .hxx. But for directory names instead cxx11 is Boost choice over cpp11? Similarly, shall macros that refer to C++11 be named BOOST_..._CPP11_... or BOOST_..._CXX11_...?
Just to let you know, the directory boost/algorithm/cxx11 has not been a part of any boost release yet (it will be part of1.50), so changing it should not break any existing code.
As to using cxx11 vs cpp11, I don't really have a preference.
As Lorenzo notes, the suffixes suggest that the directory names should use "cpp", too, but there is a difference. In "cxx11", the "cxx" is in reference to a standard version, rather than to the language itself, so a distinction might be appropriate.
I, too, don't really have a preference. However, the directories and corresponding macros should use p/P or x/X consistently.
1. Yes, I should have pointed out that Algorithm uses cxx11 only in trunk so all options are on the table (no user code will brake if we change that).
2. Yes, as a user I'd be OK with "I use .cpp/.hpp for file names but cxx/CXX for naming the language standard".
In the ScopeExit improvements I used a macro BOOST_SCOPE_EXIT_CONFIG_NO_CPP11 to force disabling implementation that uses C++11 features (lamba functions and auto declarations) even on C++11 compilers. That's also just in the trunk so I can easily change it to BOOST_SCOPE_EXIT_CONFIG_NO_CXX11.
Are there other Boost libraries (better if already released) that have used cpp/CPP over cxx/CXX to refer to the standard name? That could be used as a precedence to make a decision keeping consistency while braking no existing code.
Thanks. --Lorenzo
It looks like other Boost libraries are using CXX (and not CPP): BOOST_NO_CXX11_HDR_INITIALIZER_LIST.
Thats because I just changed all those macros from BOOST_NO_0X_* to BOOST_NO_CXX11_* last weekend.
Then I think we can proclame Boost convention to be .[ch]pp for file names, CXX for macros, and cxx for directories (and also cxx for code symbol names other than macros?).
Boost.Algorithm keeps cxx11 as the directory name and I change BOOST_SCOPE_NO_CPP11 to BOOST_SCOPE_EXIT_NO_CXX11 in my Boost.ScopeExit extensions in trunk.
Works for me. -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki