From 1c37e1a99461c8becc06bbb9fe0cf97f264d86fd Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 1 Jun 2011 14:51:03 +0000 Subject: [PATCH] add BOOST_NO_DECLTYPE_N3276 config macro [SVN r72327] --- doc/html/boost_config/acknowledgements.html | 7 +- .../boost_config/boost_macro_reference.html | 131 +++++++++-------- .../guidelines_for_boost_authors.html | 73 +++++----- doc/html/boost_config/rationale.html | 11 +- doc/html/index.html | 45 +++--- doc/macro_reference.qbk | 6 +- include/boost/config/compiler/borland.hpp | 1 + include/boost/config/compiler/clang.hpp | 1 + include/boost/config/compiler/common_edg.hpp | 1 + include/boost/config/compiler/digitalmars.hpp | 1 + include/boost/config/compiler/gcc.hpp | 4 + include/boost/config/compiler/gcc_xml.hpp | 1 + include/boost/config/compiler/hp_acc.hpp | 1 + include/boost/config/compiler/metrowerks.hpp | 1 + include/boost/config/compiler/mpw.hpp | 1 + include/boost/config/compiler/pathscale.hpp | 1 + include/boost/config/compiler/pgi.hpp | 1 + include/boost/config/compiler/sunpro_cc.hpp | 1 + include/boost/config/compiler/vacpp.hpp | 1 + include/boost/config/compiler/visualc.hpp | 1 + include/boost/config/suffix.hpp | 7 + test/all/Jamfile.v2 | 5 +- test/boost_no_decltype_n3276.ipp | 137 ++++++++++++++++++ test/config_info.cpp | 5 + test/config_test.cpp | 12 +- test/no_decltype_n3276_fail.cpp | 37 +++++ test/no_decltype_n3276_pass.cpp | 37 +++++ tools/generate.cpp | 4 +- 28 files changed, 405 insertions(+), 129 deletions(-) create mode 100644 test/boost_no_decltype_n3276.ipp create mode 100644 test/no_decltype_n3276_fail.cpp create mode 100644 test/no_decltype_n3276_pass.cpp diff --git a/doc/html/boost_config/acknowledgements.html b/doc/html/boost_config/acknowledgements.html index 95301d82..f8143ae3 100644 --- a/doc/html/boost_config/acknowledgements.html +++ b/doc/html/boost_config/acknowledgements.html @@ -3,7 +3,7 @@ Acknowledgements - + @@ -21,7 +21,7 @@
PrevUpHome
-
+
@@ -47,7 +47,8 @@
- @@ -1324,12 +1324,12 @@
-
+
-

+

The following macros describe features that are not required by the C++ standard. The macro is only defined if the feature is present.

@@ -2216,7 +2216,7 @@
-
+
-
+

Macros that describe C++0x features not supported @@ -2593,6 +2593,20 @@ + +

+ BOOST_NO_DECLTYPE_N3276 +

+ + +

+ The compiler does not support the extension to decltype + described in N3276, + accepted in Madrid, March 2011. +

+ + +

BOOST_NO_DEFAULTED_FUNCTIONS @@ -2714,7 +2728,7 @@

- The compiler does not support 'nullptr'. + The compiler does not support nullptr.

@@ -2844,12 +2858,12 @@

-
+
-

+

The following macros are either simple helpers, or macros that provide workarounds for compiler/standard library defects.

@@ -2889,10 +2903,10 @@ usage is then:

#if BOOST_WORKAROUND(MACRONAME, CONDITION)
-   // workaround code goes here...
-#else
-   // Standard conforming code goes here...
-#endif
+   // workaround code goes here...
+#else
+   // Standard conforming code goes here...
+#endif
 

where MACRONAME @@ -3277,12 +3291,12 @@

-
+
-

+

The following macros describe boost features; these are, generally speaking the only boost macros that should be tested in user code.

@@ -3555,7 +3569,7 @@
-
+

Macros for libraries with separate source code @@ -3572,14 +3586,14 @@ The following macros and helper headers are of use to authors whose libraries include separate source code, and are intended to address several issues:

-
    -
  • +
      +
    • Controlling shared library symbol visibility
    • -
    • +
    • Fixing the ABI of the compiled library
    • -
    • +
    • Selecting which compiled library to link against based upon the compilers settings
    • @@ -3588,7 +3602,7 @@ See Guidelines for Authors of Boost Libraries Containing Separate Source

      -
      +
      -
      +

      ABI Fixing @@ -3771,28 +3785,28 @@
      #ifndef MY_INCLUDE_GUARD
       #define MY_INCLUDE_GUARD
       
      -// all includes go here:
      -#include <boost/config.hpp>
      +// all includes go here:
      +#include <boost/config.hpp>
       #include <whatever>
       
      -#include <boost/config/abi_prefix.hpp> // must be the last #include
      -
      +#include <boost/config/abi_prefix.hpp> // must be the last #include
      +
       namespace boost {
       
      -// your code goes here
      -
      +// your code goes here
      +
       }
       
      -#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
      -
      -#endif // include guard
      -
      +#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas + +#endif // include guard +

      my_library.cpp

      ...
      -// nothing special need be done in the implementation file
      -...
      +// nothing special need be done in the implementation file
      +...
       

      The user can disable this mechanism by defining BOOST_DISABLE_ABI_HEADERS, @@ -3801,7 +3815,7 @@ to point to their own prefix/suffix headers if they so wish.

      -
      +

      Automatic library selection @@ -3856,12 +3870,12 @@ my_library.hpp

      ...
      -//
      -// Don't include auto-linking code if the user has disabled it by
      -// defining BOOST_ALL_NO_LIB, or BOOST_MY_LIBRARY_NO_LIB, or if this 
      -// is one of our own source files (signified by BOOST_MY_LIBRARY_SOURCE):
      -//
      -#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_MY_LIBRARY_NO_LIB) && !defined(BOOST_MY_LIBRARY_SOURCE)
      +//
      +// Don't include auto-linking code if the user has disabled it by
      +// defining BOOST_ALL_NO_LIB, or BOOST_MY_LIBRARY_NO_LIB, or if this 
      +// is one of our own source files (signified by BOOST_MY_LIBRARY_SOURCE):
      +//
      +#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_MY_LIBRARY_NO_LIB) && !defined(BOOST_MY_LIBRARY_SOURCE)
       #  define BOOST_LIB_NAME boost_my_library
       #  ifdef BOOST_MY_LIBRARY_DYN_LINK
       #     define BOOST_DYN_LINK
      @@ -3873,10 +3887,10 @@
       

      my_library.cpp

      -
      // define BOOST_MY_LIBRARY_SOURCE so that the header knows that the
      -// library is being built (possibly exporting rather than importing code)
      -//
      -#define BOOST_MY_LIBRARY_SOURCE
      +
      // define BOOST_MY_LIBRARY_SOURCE so that the header knows that the
      +// library is being built (possibly exporting rather than importing code)
      +//
      +#define BOOST_MY_LIBRARY_SOURCE
       
       #include <boost/my_library/my_library.hpp>
       ...
      @@ -3886,7 +3900,8 @@
       

      -
      -
      +

      Adding New Defect Macros @@ -206,10 +206,10 @@ the test case in a .ipp file with the following comments near the top:

      -
      //  MACRO:         BOOST_NO_FOO
      -//  TITLE:         foo
      -//  DESCRIPTION:   If the compiler fails to support foo
      -
      +
      //  MACRO:         BOOST_NO_FOO
      +//  TITLE:         foo
      +//  DESCRIPTION:   If the compiler fails to support foo
      +

      These comments are processed by the autoconf script, so make sure the format follows the one given. The file should be named "boost_no_foo.ipp", @@ -222,9 +222,9 @@

      namespace boost_no_foo {
       int test()
       {
      -    // test code goes here:
      -    //
      -    return 0;
      +    // test code goes here:
      +    //
      +    return 0;
       }
       
       }
      @@ -233,15 +233,15 @@
               Once the test code is in place in libs/config/test, updating the configuration
               test system proceeds as:
             

      -
        -
      • +
          +
        • cd into libs/config/tools and run bjam. This generates the .cpp file test cases from the .ipp file, updates the libs/config/test/all/Jamfile.v2, config_test.cpp and config_info.cpp.

        • -
        • +
        • cd into libs/config/test/all and run bjam MACRONAME compiler-list, where MACRONAME is the name of the new macro, and @@ -253,7 +253,7 @@ is defined when it should not be defined, xxx_fail_test will not report **passed**.

        • -
        • +
        • cd into libs/config/test and run bjam config_info config_test compiler-list. @@ -266,26 +266,26 @@

          Then you should:

          -
            -
          • +
              +
            • Define the defect macro in those config headers that require it.
            • -
            • +
            • Document the macro in this documentation (please do not forget this step!!)
            • -
            • +
            • Commit everything.
            • -
            • +
            • Keep an eye on the regression tests for new failures in Boost.Config caused by the addition.
            • -
            • +
            • Start using the macro.
          -
          +

          Adding New Feature Test Macros @@ -309,7 +309,7 @@ <unistd.h>).

          -
          +
          -