From d4c041fbcc238ce3638a9386b4490413f5feec0b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 24 Feb 2013 19:07:59 +0000 Subject: [PATCH] Merge changes from Trunk. Fixes #6013. Fixes #7151. Fixes #7359. Fixes #7389. Fixes #7452. Fixes #7528. Fixes #7703. Fixes #7841. Fixes #7898. Fixes #7938. Fixes #8048. [SVN r83139] --- doc/html/boost_config/acknowledgements.html | 4 +- .../boost_config/boost_macro_reference.html | 134 ++++++-- .../guidelines_for_boost_authors.html | 20 +- doc/html/boost_config/rationale.html | 8 +- doc/html/index.html | 26 +- doc/macro_reference.qbk | 83 +++-- include/boost/config/compiler/clang.hpp | 2 +- include/boost/config/compiler/gcc.hpp | 20 +- include/boost/config/compiler/vacpp.hpp | 4 +- include/boost/config/compiler/visualc.hpp | 25 +- include/boost/config/platform/vxworks.hpp | 293 ++++++++++++++++-- include/boost/config/platform/win32.hpp | 4 +- .../boost/config/select_compiler_config.hpp | 8 +- include/boost/config/stdlib/dinkumware.hpp | 2 +- include/boost/config/suffix.hpp | 2 + test/Jamfile.v2 | 18 +- test/boost_has_hash.ipp | 9 +- test/boost_has_nrvo.ipp | 8 +- test/boost_no_auto_declarations.ipp | 2 +- test/boost_no_auto_multidecl.ipp | 2 +- test/boost_no_char16_t.ipp | 4 +- test/boost_no_char32_t.ipp | 4 +- test/boost_no_cxx11_allocator.ipp | 4 + test/boost_no_cxx11_hdr_array.ipp | 2 +- test/boost_no_cxx11_hdr_initializer_list.ipp | 2 +- test/boost_no_cxx11_smart_ptr.ipp | 3 + test/boost_no_decltype.ipp | 8 +- test/boost_no_is_abstract.ipp | 8 +- test/boost_no_std_wstreambuf.ipp | 10 +- test/boost_no_stdc_namespace.ipp | 14 +- test/boost_no_tem_local_classes.ipp | 2 +- test/boost_no_template_streams.ipp | 7 +- test/boost_no_typeid.ipp | 2 +- test/boost_no_typename_with_ctor.ipp | 1 + test/boost_no_unicode_literals.ipp | 5 +- test/boost_no_unified_init.ipp | 14 +- test/boost_no_using_breaks_adl.ipp | 9 +- 37 files changed, 602 insertions(+), 171 deletions(-) diff --git a/doc/html/boost_config/acknowledgements.html b/doc/html/boost_config/acknowledgements.html index f8143ae3..ae598f9d 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
-
+
diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 5039c99f..3240ba59 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3,7 +3,7 @@ Boost Macro Reference - + @@ -22,7 +22,7 @@
PrevUpHomeNext
-
+ -
+

Macros that describe C++03 defects @@ -93,7 +93,7 @@

- The compiler exibits certain partial specialisation bug - probably + The compiler exhibits certain partial specialisation bug - probably Borland C++ Builder specific.

@@ -1338,7 +1338,7 @@

-
+

Macros that describe optional features @@ -1832,6 +1832,9 @@

The library has a TR1 conforming version of <array>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_ARRAY.

@@ -1884,7 +1887,9 @@

- The library has TR1 conforming reference wrappers in <functional>. + The library has TR1 conforming reference wrappers in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1901,7 +1906,9 @@

- The library has a TR1 conforming result_of template in <functional>. + The library has a TR1 conforming result_of template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1918,7 +1925,9 @@

- The library has a TR1 conforming mem_fn function template in <functional>. + The library has a TR1 conforming mem_fn function template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1935,7 +1944,9 @@

- The library has a TR1 conforming bind function template in <functional>. + The library has a TR1 conforming bind function template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1952,7 +1963,9 @@

- The library has a TR1 conforming function class template in <functional>. + The library has a TR1 conforming function class template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1969,7 +1982,9 @@

- The library has a TR1 conforming hash function template in <functional>. + The library has a TR1 conforming hash function template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1988,6 +2003,9 @@

The library has a TR1 conforming shared_ptr class template in <memory>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_SMART_PTR.

@@ -2005,6 +2023,9 @@

The library has a TR1 conforming version of <random>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_RANDOM.

@@ -2022,6 +2043,9 @@

The library has a TR1 conforming version of <regex>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_REGEX.

@@ -2039,6 +2063,9 @@

The library has a TR1 conforming version of <tuple>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_TUPLE.

@@ -2056,6 +2083,9 @@

The library has a TR1 conforming version of <type_traits>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_TYPE_TRAITS.

@@ -2074,6 +2104,9 @@

The library has the TR1 additions to <utility> (tuple interface to std::pair). + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_TUPLE.

@@ -2091,6 +2124,9 @@

The library has a TR1 conforming version of <unordered_map>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_UNORDERED_MAP.

@@ -2108,6 +2144,9 @@

The library has a TR1 conforming version of <unordered_set>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_UNORDERED_SET.

@@ -2267,7 +2306,7 @@

-
+
-
+
-
+

Macros that allow use of C++11 features with C++03 compilers @@ -3063,6 +3102,7 @@

BOOST_NOEXCEPT
+BOOST_NOEXCEPT_OR_NOTHROW
 BOOST_NOEXCEPT_IF(Predicate)
 BOOST_NOEXCEPT_EXPR(Expression)
 
@@ -3071,7 +3111,7 @@

- If BOOST_NO_NOEXCEPT + If BOOST_NO_CXX11_NOEXCEPT is defined (i.e. C++03 compliant compilers) these macros are defined as:

@@ -3079,6 +3119,7 @@

#define BOOST_NOEXCEPT
+#define BOOST_NOEXCEPT_OR_NOTHROW throw()
 #define BOOST_NOEXCEPT_IF(Predicate)
 #define BOOST_NOEXCEPT_EXPR(Expression) false
 
@@ -3086,7 +3127,7 @@

- If BOOST_NO_NOEXCEPT + If BOOST_NO_CXX11_NOEXCEPT is not defined (i.e. C++11 compliant compilers) they are defined as:

@@ -3094,6 +3135,7 @@

#define BOOST_NOEXCEPT noexcept
+#define BOOST_NOEXCEPT_OR_NOTHROW noexcept
 #define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
 #define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
 
@@ -3102,10 +3144,29 @@
+ + +

+ BOOST_MSVC_ENABLE_2012_NOV_CTP +

+ + +

+ For Microsoft Visual C++ 2012, enable the C++11 features supplied + by the November 2012 Community Technology Preview. These features + are not automatically enabled because the CTP is non-supported + alpha code that is not recommended for production use. This macro + must be defined before including any Boost headers, and must be + defined for all translation units in the program, including Boost + library builds. This macro will no longer have any effect once + an official Microsoft release supports the CTP features. +

+ +
-
+

Boost Helper Macros @@ -3501,7 +3562,7 @@

-
+

Boost Informational Macros @@ -3634,6 +3695,29 @@ + +

+ BOOST_GCC +

+ + +

+ <boost/config.hpp> +

+ + +

+ Defined if the compiler is really GCC, as opposed to one of the + many other compilers that also define __GNUC__. + Has the value: __GNUC__ + * 10000 + + __GNUC_MINOR__ + * 100 + + __GNUC_PATCHLEVEL__. +

+ + +

BOOST_INTEL @@ -3779,7 +3863,7 @@

-
+

Boost Deprecated Macros @@ -4834,7 +4918,7 @@

-
+

Macros for libraries with separate source code @@ -4851,7 +4935,7 @@ 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
    • @@ -4867,7 +4951,7 @@ See Guidelines for Authors of Boost Libraries Containing Separate Source

      -
      +
      -
      +

      ABI Fixing @@ -5080,7 +5164,7 @@ to point to their own prefix/suffix headers if they so wish.

      -
      +

      Automatic library selection @@ -5107,7 +5191,7 @@

      -
      +
      BOOST_LIB_NAME

      Required: An identifier containing the basename of the library, for diff --git a/doc/html/boost_config/guidelines_for_boost_authors.html b/doc/html/boost_config/guidelines_for_boost_authors.html index abc8a79b..f64ef39b 100644 --- a/doc/html/boost_config/guidelines_for_boost_authors.html +++ b/doc/html/boost_config/guidelines_for_boost_authors.html @@ -3,7 +3,7 @@ Guidelines for Boost Authors - + @@ -22,7 +22,7 @@

      PrevUpHomeNext
      -
      +

      Guidelines for Boost Authors @@ -61,7 +61,7 @@

      Note that:

      -
        +
        • Boost library implementers are not required to "#include <boost/config.hpp>", and are not required in any @@ -103,7 +103,7 @@ the majority of compilers, such as namespaces, exceptions, RTTI, or templates.
        -
        +

        Disabling Compiler Warnings @@ -116,7 +116,7 @@

        Note that:

        -
          +
          • This header should never be included by another Boost header, it should only ever be @@ -182,7 +182,7 @@
        -
        +

        Adding New Defect Macros @@ -233,7 +233,7 @@ 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 @@ -266,7 +266,7 @@

            Then you should:

            -
              +
              • Define the defect macro in those config headers that require it.
              • @@ -285,7 +285,7 @@
            -
            +

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

            -
            +

            Modifying the Boost Configuration Headers diff --git a/doc/html/boost_config/rationale.html b/doc/html/boost_config/rationale.html index f92d7993..d795c63c 100644 --- a/doc/html/boost_config/rationale.html +++ b/doc/html/boost_config/rationale.html @@ -3,7 +3,7 @@ Rationale - + @@ -22,7 +22,7 @@
            PrevUpHomeNext
            -
            +
            @@ -39,7 +39,7 @@ principles from the following article.

            -
            +
            @@ -90,7 +90,7 @@ code must be provided.

            -
            +
            diff --git a/doc/html/index.html b/doc/html/index.html index 951c2712..bdf89c1b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Boost.Config - + @@ -97,7 +97,7 @@
            Acknowledgements

      -
      +
      -
      +

      Using the default boost configuration @@ -140,7 +140,7 @@ and submitting a support request.

      -
      +

      The <boost/config.hpp> header @@ -171,7 +171,7 @@ developers list.

      -
      +

      Using the configure script @@ -292,7 +292,7 @@ (located under <boost-root>/boost/config/). There are two ways you can use this header:

      -
        +
        • Option 1: copy the header into <boost-root>/boost/config/ so that it replaces the default user.hpp provided by boost. This option allows only one configure-generated setup; @@ -313,7 +313,7 @@
      -
      +

      User settable options @@ -679,7 +679,7 @@

      -
      +

      Advanced configuration usage @@ -723,7 +723,7 @@

      The following usage examples represent just a few of the possibilities:

      -
      +

      Example 1: creating our own frozen configuration @@ -755,7 +755,7 @@ yet supported by boost.

      -
      +

      Example 2: skipping files that you don't need @@ -774,7 +774,7 @@ a dependency on two boost headers.

      -
      +
      -
      +

      Testing the boost configuration @@ -951,7 +951,7 @@

      - +

      Last revised: December 28, 2012 at 17:08:34 GMT

      Last revised: February 19, 2013 at 16:25:18 GMT


      diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 0435acc2..6b424546 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -28,7 +28,7 @@ compiler's conformance with the 2003 standard. [[`BOOST_BCB_PARTIAL_SPECIALIZATION_BUG`][Compiler][ -The compiler exibits certain partial specialisation bug - probably Borland +The compiler exhibits certain partial specialisation bug - probably Borland C++ Builder specific. ]] [[`BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL`][Compiler][ @@ -429,7 +429,9 @@ The standard library lacks a conforming `std::use_facet`, but has a workaround class-version that does the job. This is primarily for the STLport std lib. ]] [[`BOOST_HAS_TR1_ARRAY`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_ARRAY. ]] [[`BOOST_HAS_TR1_COMPLEX_OVERLOADS`][Standard library][ The library has a version of `` that supports passing scalars to the @@ -440,46 +442,74 @@ The library has a version of `` that includes the new inverse trig functions from TR1. ]] [[`BOOST_HAS_TR1_REFERENCE_WRAPPER`][Standard library][ -The library has TR1 conforming reference wrappers in ``. +The library has TR1 conforming reference wrappers in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_RESULT_OF`][Standard library][ -The library has a TR1 conforming result_of template in ``. +The library has a TR1 conforming result_of template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_MEM_FN`][Standard library][ -The library has a TR1 conforming mem_fn function template in ``. +The library has a TR1 conforming mem_fn function template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_BIND`][Standard library][ -The library has a TR1 conforming bind function template in ``. +The library has a TR1 conforming bind function template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_FUNCTION`][Standard library][ -The library has a TR1 conforming function class template in ``. +The library has a TR1 conforming function class template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_HASH`][Standard library][ -The library has a TR1 conforming hash function template in ``. +The library has a TR1 conforming hash function template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_SHARED_PTR`][Standard library][ -The library has a TR1 conforming `shared_ptr` class template in ``. +The library has a TR1 conforming `shared_ptr` class template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_SMART_PTR. ]] [[`BOOST_HAS_TR1_RANDOM`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_RANDOM. ]] [[`BOOST_HAS_TR1_REGEX`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_REGEX. ]] [[`BOOST_HAS_TR1_TUPLE`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_TUPLE. ]] [[`BOOST_HAS_TR1_TYPE_TRAITS`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_TYPE_TRAITS. ]] [[`BOOST_HAS_TR1_UTILITY`][Standard library][ -The library has the TR1 additions to `` (tuple interface to `std::pair`). +The library has the TR1 additions to `` (tuple interface to `std::pair`). This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_TUPLE. ]] [[`BOOST_HAS_TR1_UNORDERED_MAP`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_UNORDERED_MAP. ]] [[`BOOST_HAS_TR1_UNORDERED_SET`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_UNORDERED_SET. ]] [[`BOOST_HAS_TR1`][Standard library][ Implies all the other `BOOST_HAS_TR1_*` macros should be set. @@ -700,27 +730,39 @@ with: [[ `` BOOST_NOEXCEPT + BOOST_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_IF(Predicate) BOOST_NOEXCEPT_EXPR(Expression) `` ][ -If `BOOST_NO_NOEXCEPT` is defined (i.e. C++03 compliant compilers) these macros are defined as: +If `BOOST_NO_CXX11_NOEXCEPT` is defined (i.e. C++03 compliant compilers) these macros are defined as: [: `` #define BOOST_NOEXCEPT + #define BOOST_NOEXCEPT_OR_NOTHROW throw() #define BOOST_NOEXCEPT_IF(Predicate) #define BOOST_NOEXCEPT_EXPR(Expression) false `` ] -If `BOOST_NO_NOEXCEPT` is not defined (i.e. C++11 compliant compilers) they are defined as: +If `BOOST_NO_CXX11_NOEXCEPT` is not defined (i.e. C++11 compliant compilers) they are defined as: [: `` #define BOOST_NOEXCEPT noexcept + #define BOOST_NOEXCEPT_OR_NOTHROW noexcept #define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) #define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) `` ] ]] +[[`BOOST_MSVC_ENABLE_2012_NOV_CTP`][ +For Microsoft Visual C++ 2012, enable the C++11 features supplied by the +November 2012 Community Technology Preview. These features are not automatically +enabled because the CTP is non-supported alpha code that is not recommended +for production use. This macro must be defined before including any Boost headers, +and must be defined for all translation units in the program, including Boost library builds. +This macro will no longer have any effect once an official Microsoft +release supports the CTP features. +]] ] [endsect] @@ -961,6 +1003,11 @@ Defined to a normalised 9 digit version of _MSC_FULL_VER (which sometimes only h the macro has the form VVMMPPPPP where VV is the major version number, MM is the minor version number, and PPPPP is the compiler build number. ]] +[[`BOOST_GCC`][``][ +Defined if the compiler is really GCC, as opposed to one +of the many other compilers that also define `__GNUC__`. Has the value: +`__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__`. +]] [[`BOOST_INTEL`][``][ Defined if the compiler is an Intel compiler, takes the same value as the compiler version macro. diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 18d6e546..209c9007 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -20,7 +20,7 @@ # define BOOST_NO_TYPEID #endif -#if defined(__int64) +#if defined(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index c0ac30af..27a314da 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -11,7 +11,14 @@ // See http://www.boost.org for most recent version. -// GNU C++ compiler setup: +// GNU C++ compiler setup. + +// +// Define BOOST_GCC so we know this is "real" GCC and not some pretender: +// +#if !defined(__CUDACC__) +#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif #if __GNUC__ < 3 # if __GNUC_MINOR__ == 91 @@ -147,9 +154,16 @@ #endif // -// Recent GCC versions have __int128 when in 64-bit mode: +// Recent GCC versions have __int128 when in 64-bit mode. // -#if defined(__SIZEOF_INT128__) +// We disable this if the compiler is really nvcc as it +// doesn't actually support __int128 as of CUDA_VERSION=5000 +// even though it defines __SIZEOF_INT128__. +// See https://svn.boost.org/trac/boost/ticket/8048 +// Only re-enable this for nvcc if you're absolutely sure +// of the circumstances under which it's supported: +// +#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 2410d5a3..9792e00e 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -53,8 +53,8 @@ #error "Compiler not supported or configured - please reconfigure" #endif // -// last known and checked version is 1110: -#if (__IBMCPP__ > 1110) +// last known and checked version is 1210: +#if (__IBMCPP__ > 1210) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index aa4584df..89c0f050 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -134,10 +134,6 @@ // (Niels Dekker, LKEB, May 2010) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0 -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - #ifndef _NATIVE_WCHAR_T_DEFINED # define BOOST_NO_INTRINSIC_WCHAR_T #endif @@ -221,24 +217,31 @@ # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // _MSC_VER < 1700 -// C++0x features not supported by any versions +// C++11 features supported by VC++ 11 (aka 2012) November 2012 CTP +// Because the CTP is unsupported, unrelease, and only alpha quality, +// it is only supported if BOOST_ENABLE_MSVC_2012_NOV_CTP is defined. +// +#if _MSC_FULL_VER < 170051025 || !defined(BOOST_MSVC_ENABLE_2012_NOV_CTP) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +// C++11 features not supported by any versions #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + // // prefix and suffix headers: // diff --git a/include/boost/config/platform/vxworks.hpp b/include/boost/config/platform/vxworks.hpp index 6ec5171e..0ad22c97 100644 --- a/include/boost/config/platform/vxworks.hpp +++ b/include/boost/config/platform/vxworks.hpp @@ -1,31 +1,288 @@ -// (C) Copyright Dustin Spicuzza 2009. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright Dustin Spicuzza 2009. +// Adapted to vxWorks 6.9 by Peter Brockamp 2012. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. -// vxWorks specific config options: +// Since WRS does not yet properly support boost under vxWorks +// and this file was badly outdated, but I was keen on using it, +// I patched boost myself to make things work. This has been tested +// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access +// to earlier 6.X versions! The only thing I know for sure is that +// very old versions of vxWorks (namely everything below 6.x) are +// absolutely unable to use boost. This is mainly due to the completely +// outdated libraries and ancient compiler (GCC 2.96 or worse). Do +// not even think of getting this to work, a miserable failure will +// be guaranteed! +// Equally, this file has been tested for RTPs (Real Time Processes) +// only, not for DKMs (Downloadable Kernel Modules). These two types +// of executables differ largely in the available functionality of +// the C-library, STL, and so on. A DKM uses a library similar to those +// of vxWorks 5.X - with all its limitations and incompatibilities +// in respect to ANSI C++ and STL. So probably there might be problems +// with the usage of boost from DKMs. WRS or any voluteers are free to +// prove the opposite! -#define BOOST_PLATFORM "vxWorks" - -#define BOOST_NO_CWCHAR -#define BOOST_NO_INTRINSIC_WCHAR_T - -#if defined(__GNUC__) && defined(__STRICT_ANSI__) -#define BOOST_NO_INT64_T +// Block out all versions before vxWorks 6.x, as these don't work: +// Include header with the vxWorks version information and query them +#include +#if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) +# error "The vxWorks version you're using is so badly outdated,\ + it doesn't work at all with boost, sorry, no chance!" #endif +// Handle versions above 5.X but below 6.9 +#if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) +// TODO: Starting from what version does vxWorks work with boost? +// We can't reasonably insert a #warning "" as a user hint here, +// as this will show up with every file including some boost header, +// badly bugging the user... So for the time being we just leave it. +#endif + +// vxWorks specific config options: +// -------------------------------- +#define BOOST_PLATFORM "vxWorks" + +// Special behaviour for DKMs: +#ifdef _WRS_KERNEL + // DKMs do not have the -header, + // but apparently they do have an intrinsic wchar_t meanwhile! +# define BOOST_NO_CWCHAR + + // Lots of wide-functions and -headers are unavailable for DKMs as well: +# define BOOST_NO_CWCTYPE +# define BOOST_NO_SWPRINTF +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +// Generally available headers: #define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_SLIST -// these allow posix_features to work, since vxWorks doesn't -// define them itself -#define _POSIX_TIMERS 1 -#define _POSIX_THREADS 1 +// vxWorks does not have installed an iconv-library by default, +// so unfortunately no Unicode support from scratch is available! +// Thus, instead it is suggested to switch to ICU, as this seems +// to be the most complete and portable option... +#define BOOST_LOCALE_WITH_ICU -// vxworks doesn't work with asio serial ports +// Generally available functionality: +#define BOOST_HAS_THREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_MACRO_USE_FACET + +// Generally unavailable functionality, delivered by boost's test function: +//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// Generally available threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_SIGACTION + +// Functionality available for RTPs only: +#ifdef __RTP__ +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_LOG1P +# define BOOST_HAS_EXPM1 +#endif + +// Functionality available for DKMs only: +#ifdef _WRS_KERNEL + // Luckily, at the moment there seems to be none! +#endif + +// These #defines allow posix_features to work, since vxWorks doesn't +// #define them itself for DKMs (for RTPs on the contrary it does): +#ifdef _WRS_KERNEL +# ifndef _POSIX_TIMERS +# define _POSIX_TIMERS 1 +# endif +# ifndef _POSIX_THREADS +# define _POSIX_THREADS 1 +# endif +#endif + +// vxWorks doesn't work with asio serial ports: #define BOOST_ASIO_DISABLE_SERIAL_PORT +// TODO: The problem here seems to bee that vxWorks uses its own, very specific +// ways to handle serial ports, incompatible with POSIX or anything... +// Maybe a specific implementation would be possible, but until the +// straight need arises... This implementation would presumably consist +// of some vxWorks specific ioctl-calls, etc. Any voluteers? -// boilerplate code: +// vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but +// miserably fails to #include the required to make +// sysClkRateGet() available! So we manually include it here. +#ifdef __RTP__ +# include +# include +#endif + +// vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and +// UINT64_C() are defined errorneously, yielding not a signed/ +// unsigned long/long long type, but a signed/unsigned int/long +// type. Eventually this leads to compile errors in ratio_fwd.hpp, +// when trying to define several constants which do not fit into a +// long type! We correct them here by redefining. +#include + +// Some macro-magic to do the job +#define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) +#define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) +#define VX_DO_JOIN2(X, Y) X##Y + +// Correctly setup the macros +#undef INT32_C +#undef UINT32_C +#undef INT64_C +#undef UINT64_C +#define INT32_C(x) VX_JOIN(x, L) +#define UINT32_C(x) VX_JOIN(x, UL) +#define INT64_C(x) VX_JOIN(x, LL) +#define UINT64_C(x) VX_JOIN(x, ULL) + +// #include Libraries required for the following function adaption +#include +#include +#include + +// Use C-linkage for the following helper functions +extern "C" { + +// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. +// But we have the similar functions getprlimit() and setprlimit(), +// which may serve the purpose. +// Problem: The vxWorks-documentation regarding these functions +// doesn't deserve its name! It isn't documented what the first two +// parameters idtype and id mean, so we must fall back to an educated +// guess - null, argh... :-/ + +// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. +// Thus for DKMs there would have to be another implementation. +#ifdef __RTP__ + inline int getrlimit(int resource, struct rlimit *rlp){ + return getprlimit(0, 0, resource, rlp); + } + + inline int setrlimit(int resource, const struct rlimit *rlp){ + return setprlimit(0, 0, resource, const_cast(rlp)); + } +#endif + +// vxWorks has ftruncate() only, so we do simulate truncate(): +inline int truncate(const char *p, off_t l){ + int fd = open(p, O_WRONLY); + if (fd == -1){ + errno = EACCES; + return -1; + } + if (ftruncate(fd, l) == -1){ + close(fd); + errno = EACCES; + return -1; + } + return close(fd); +} + +// Fake symlink handling by dummy functions: +inline int symlink(const char*, const char*){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +inline ssize_t readlink(const char*, char*, size_t){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +// vxWorks claims to implement gettimeofday in sys/time.h +// but nevertheless does not provide it! See +// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 +// We implement a surrogate version here via clock_gettime: +inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + tv->tv_sec = ts.tv_sec; + tv->tv_usec = ts.tv_nsec / 1000; + return 0; +} + +// vxWorks does provide neither struct tms nor function times()! +// We implement an empty dummy-function, simply setting the user +// and system time to the half of thew actual system ticks-value +// and the child user and system time to 0. +// Rather ugly but at least it suppresses compiler errors... +// Unfortunately, this of course *does* have an severe impact on +// dependant libraries, actually this is chrono only! Here it will +// not be possible to correctly use user and system times! But +// as vxWorks is lacking the ability to calculate user and system +// process times there seems to be no other possible solution. +struct tms{ + clock_t tms_utime; // User CPU time + clock_t tms_stime; // System CPU time + clock_t tms_cutime; // User CPU time of terminated child processes + clock_t tms_cstime; // System CPU time of terminated child processes +}; + +inline clock_t times(struct tms *t){ + struct timespec ts; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); + clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + + static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); + t->tms_utime = ticks/2U; + t->tms_stime = ticks/2U; + t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! + t->tms_cstime = 0; // -> Set the wait times for childs to 0 + return ticks; +} + +} // extern "C" + +// Put the selfmade functions into the std-namespace, just in case +namespace std { +# ifdef __RTP__ + using ::getrlimit; + using ::setrlimit; +# endif + using ::truncate; + using ::symlink; + using ::readlink; + using ::times; + using ::gettimeofday; +} + +// Some more macro-magic: +// vxWorks-around: Some functions are not present or broken in vxWorks +// but may be patched to life via helper macros... + +// Include signal.h which might contain a typo to be corrected here +#include + +#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! +#ifndef S_ISSOCK +# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? +#endif +#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! +#ifndef FPE_FLTINV +# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy +#endif +#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) +# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' +#endif +//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! + +// #include boilerplate code: #include - + +// vxWorks lies about XSI conformance, there is no nl_types.h: +#undef BOOST_HAS_NL_TYPES_H diff --git a/include/boost/config/platform/win32.hpp b/include/boost/config/platform/win32.hpp index 39220127..6ab59f4e 100644 --- a/include/boost/config/platform/win32.hpp +++ b/include/boost/config/platform/win32.hpp @@ -33,7 +33,9 @@ #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) # define BOOST_HAS_STDINT_H -# define __STDC_LIMIT_MACROS +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS +# endif # define BOOST_HAS_DIRENT_H # define BOOST_HAS_UNISTD_H #endif diff --git a/include/boost/config/select_compiler_config.hpp b/include/boost/config/select_compiler_config.hpp index 0d47b254..8683d658 100644 --- a/include/boost/config/select_compiler_config.hpp +++ b/include/boost/config/select_compiler_config.hpp @@ -33,6 +33,10 @@ // PathScale EKOPath compiler (has to come before clang and gcc) # define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" + #elif defined __clang__ // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" @@ -41,10 +45,6 @@ // Digital Mars C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -// Intel -# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" - # elif defined __GNUC__ // GNU C++: # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 30588517..cef6ff24 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -87,7 +87,7 @@ #endif #include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) # define BOOST_NO_STD_TYPEINFO #endif diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 8ee88d90..4dc27fba 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -874,10 +874,12 @@ namespace std{ using ::type_info; } // #ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_NOEXCEPT +# define BOOST_NOEXCEPT_OR_NOTHROW throw() # define BOOST_NOEXCEPT_IF(Predicate) # define BOOST_NOEXCEPT_EXPR(Expression) false #else # define BOOST_NOEXCEPT noexcept +# define BOOST_NOEXCEPT_OR_NOTHROW noexcept # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) #endif diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index df613523..314ab4bd 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,13 +1,19 @@ # # Copyright John Maddock 2008. -# Use, modification and distribution are subject to the -# Boost Software License, Version 1.0. (See accompanying file +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # # If you need to alter build preferences then set them in # the template defined in options_v2.jam. # +project + : requirements + gcc:-Wno-deprecated-declarations +; + + import modules ; local is_unix = [ modules.peek : UNIX ] ; @@ -24,20 +30,20 @@ if $(is_unix) } test-suite config - : + : [ compile config_test_c.c ] - [ run config_test.cpp + [ run config_test.cpp : #args : #input-files : #requirements multi : config_test_threaded ] - [ run config_test.cpp + [ run config_test.cpp : #args : #input-files : #requirements - single msvc:static msvc:static + single msvc:static msvc:static linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) diff --git a/test/boost_has_hash.ipp b/test/boost_has_hash.ipp index a3afbb2c..0363940d 100644 --- a/test/boost_has_hash.ipp +++ b/test/boost_has_hash.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -13,10 +13,11 @@ #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # ifdef BOOST_NO_CXX11_STD_UNORDERED # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx +# define _BACKWARD_BACKWARD_WARNING_H 1 /* turn off warnings from the headers below */ # include # include # else - // If we have BOOST_NO_CXX11_STD_UNORDERED *not* defined, then we must + // If we have BOOST_NO_CXX11_STD_UNORDERED *not* defined, then we must // not include the headers as they clash with the C++0x // headers. ie in any given translation unit we can include one // or the other, but not both. diff --git a/test/boost_has_nrvo.ipp b/test/boost_has_nrvo.ipp index 2611b4ec..ad6f17f6 100644 --- a/test/boost_has_nrvo.ipp +++ b/test/boost_has_nrvo.ipp @@ -1,7 +1,7 @@ // (C) Copyright Terje Slettebo 2001. -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -18,7 +18,7 @@ class test_class { public: test_class() {} - test_class(const test_class &other) + test_class(const test_class&) { ++copy_count; } diff --git a/test/boost_no_auto_declarations.ipp b/test/boost_no_auto_declarations.ipp index ce526eb8..9201b160 100644 --- a/test/boost_no_auto_declarations.ipp +++ b/test/boost_no_auto_declarations.ipp @@ -11,7 +11,7 @@ namespace boost_no_cxx11_auto_declarations { -void check_f(int& x) +void check_f(int&) { } diff --git a/test/boost_no_auto_multidecl.ipp b/test/boost_no_auto_multidecl.ipp index fe22cadc..8fb7d5e4 100644 --- a/test/boost_no_auto_multidecl.ipp +++ b/test/boost_no_auto_multidecl.ipp @@ -11,7 +11,7 @@ namespace boost_no_cxx11_auto_multideclarations { -void check_f(int& x, int*& y) +void check_f(int&, int*&) { } diff --git a/test/boost_no_char16_t.ipp b/test/boost_no_char16_t.ipp index 8e7fbae1..4efff95e 100644 --- a/test/boost_no_char16_t.ipp +++ b/test/boost_no_char16_t.ipp @@ -24,8 +24,8 @@ void f(const unsigned long*){} int test() { - const char16_t* p; - f(p); + const char16_t p(0); + f(&p); return 0; } diff --git a/test/boost_no_char32_t.ipp b/test/boost_no_char32_t.ipp index 062215c9..9778bff0 100644 --- a/test/boost_no_char32_t.ipp +++ b/test/boost_no_char32_t.ipp @@ -23,8 +23,8 @@ void f(const unsigned long*){} int test() { - const char32_t* p; - f(p); + const char32_t p(0); + f(&p); return 0; } diff --git a/test/boost_no_cxx11_allocator.ipp b/test/boost_no_cxx11_allocator.ipp index 2865fb7d..ad14bdef 100644 --- a/test/boost_no_cxx11_allocator.ipp +++ b/test/boost_no_cxx11_allocator.ipp @@ -17,6 +17,7 @@ namespace boost_no_cxx11_allocator { int test() { std::pointer_traits* p = 0; + (void) p; //std::pointer_safety s = std::relaxed; //char* (*l_undeclare_reachable)(char *p) = std::undeclare_reachable; @@ -28,6 +29,9 @@ int test() std::uses_allocator > ua; std::allocator_traits > at; + (void)aat; + (void)ua; + (void)at; return 0; } diff --git a/test/boost_no_cxx11_hdr_array.ipp b/test/boost_no_cxx11_hdr_array.ipp index 79ad7290..7bbead1c 100644 --- a/test/boost_no_cxx11_hdr_array.ipp +++ b/test/boost_no_cxx11_hdr_array.ipp @@ -16,7 +16,7 @@ namespace boost_no_cxx11_hdr_array { int test() { - std::array a = { 1, 2, 3 }; + std::array a = {{ 1, 2, 3 }}; return a.size() == 3 ? 0 : 1; } diff --git a/test/boost_no_cxx11_hdr_initializer_list.ipp b/test/boost_no_cxx11_hdr_initializer_list.ipp index 3efcce94..e7ee8389 100644 --- a/test/boost_no_cxx11_hdr_initializer_list.ipp +++ b/test/boost_no_cxx11_hdr_initializer_list.ipp @@ -14,7 +14,7 @@ namespace boost_no_cxx11_hdr_initializer_list { -void foo(const std::initializer_list& l) +void foo(const std::initializer_list&) { } diff --git a/test/boost_no_cxx11_smart_ptr.ipp b/test/boost_no_cxx11_smart_ptr.ipp index 817a0249..5b563df7 100644 --- a/test/boost_no_cxx11_smart_ptr.ipp +++ b/test/boost_no_cxx11_smart_ptr.ipp @@ -26,6 +26,9 @@ int test() std::hash > h1; std::hash > h2; + (void)h1; + (void)h2; + return 0; } diff --git a/test/boost_no_decltype.ipp b/test/boost_no_decltype.ipp index d361d201..0b059243 100644 --- a/test/boost_no_decltype.ipp +++ b/test/boost_no_decltype.ipp @@ -40,11 +40,11 @@ void baz(F f) int test() { int i; - decltype(i) j; -// quiet_warning(j); + decltype(i) j(0); + quiet_warning(j); decltype(get_test_class()) k; - #ifndef _MSC_VER - // Although the VC++ decltype is buggy, we none the less enable support, + #ifndef _MSC_VER + // Although the VC++ decltype is buggy, we none the less enable support, // so don't test the bugs for now! baz(get_test_class); #endif diff --git a/test/boost_no_is_abstract.ipp b/test/boost_no_is_abstract.ipp index d44695c8..257318ee 100644 --- a/test/boost_no_is_abstract.ipp +++ b/test/boost_no_is_abstract.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock and Dave Abrahams 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock and Dave Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -46,7 +46,7 @@ struct abstract{ virtual void foo() = 0; }; int test() { - return is_abstract_test::value == is_abstract_test::value; + return static_cast(is_abstract_test::value) == static_cast(is_abstract_test::value); } } diff --git a/test/boost_no_std_wstreambuf.ipp b/test/boost_no_std_wstreambuf.ipp index 1be252ee..45de2426 100644 --- a/test/boost_no_std_wstreambuf.ipp +++ b/test/boost_no_std_wstreambuf.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -35,7 +35,7 @@ protected: private: parser_buf& operator=(const parser_buf&) { return *this; }; - parser_buf(const parser_buf&){}; + parser_buf(const parser_buf&); }; template @@ -56,7 +56,7 @@ parser_buf::seekoff(off_type off, ::std::ios_base::seekdir way, : int size = this->egptr() - this->eback(); int pos = this->gptr() - this->eback(); charT* g = this->eback(); - switch(way) + switch((int)way) { case ::std::ios_base::beg: if((off < 0) || (off > size)) diff --git a/test/boost_no_stdc_namespace.ipp b/test/boost_no_stdc_namespace.ipp index 993aec74..3ff3f494 100644 --- a/test/boost_no_stdc_namespace.ipp +++ b/test/boost_no_stdc_namespace.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -29,12 +29,12 @@ int test() { char c = 0; #ifndef BOOST_NO_CTYPE_FUNCTIONS - std::isspace(c); - std::isalpha(c); - std::ispunct(c); + (void)std::isspace(c); + (void)std::isalpha(c); + (void)std::ispunct(c); #endif (void)std::strlen(&c); - std::clock(); + (void)std::clock(); return 0; } diff --git a/test/boost_no_tem_local_classes.ipp b/test/boost_no_tem_local_classes.ipp index 04e07b87..876980ec 100644 --- a/test/boost_no_tem_local_classes.ipp +++ b/test/boost_no_tem_local_classes.ipp @@ -19,7 +19,7 @@ namespace boost_no_cxx11_local_class_template_parameters { template struct a { void use() {} }; -template void f(T x) {} +template void f(T) {} int test() { class local_class {} local_obj; diff --git a/test/boost_no_template_streams.ipp b/test/boost_no_template_streams.ipp index 3379d590..bb24e132 100644 --- a/test/boost_no_template_streams.ipp +++ b/test/boost_no_template_streams.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2008. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -17,6 +17,7 @@ namespace boost_no_templated_iostreams{ int test() { std::basic_ostream >& osr = std::cout; + (void)osr; return 0; } diff --git a/test/boost_no_typeid.ipp b/test/boost_no_typeid.ipp index 3b127d5f..72dd4d3d 100644 --- a/test/boost_no_typeid.ipp +++ b/test/boost_no_typeid.ipp @@ -16,7 +16,7 @@ namespace boost_no_typeid int test() { - typeid(int); + (void)typeid(int); return 0; } diff --git a/test/boost_no_typename_with_ctor.ipp b/test/boost_no_typename_with_ctor.ipp index 68a5a0ec..6cf4da84 100644 --- a/test/boost_no_typename_with_ctor.ipp +++ b/test/boost_no_typename_with_ctor.ipp @@ -26,6 +26,7 @@ typename T::type f() { int test() { A a = f >(); + (void)a; return 0; } diff --git a/test/boost_no_unicode_literals.ipp b/test/boost_no_unicode_literals.ipp index 1675d205..d5ffa0cb 100644 --- a/test/boost_no_unicode_literals.ipp +++ b/test/boost_no_unicode_literals.ipp @@ -12,7 +12,8 @@ namespace boost_no_cxx11_unicode_literals { -void quiet_warning(const char*){} +template +void quiet_warning(const CharT*){} int test() { @@ -20,6 +21,8 @@ int test() const char16_t* c16 = u""; const char32_t* c32 = U""; quiet_warning(c8); + quiet_warning(c16); + quiet_warning(c32); return 0; } diff --git a/test/boost_no_unified_init.ipp b/test/boost_no_unified_init.ipp index 2a09c5f3..a28a223a 100644 --- a/test/boost_no_unified_init.ipp +++ b/test/boost_no_unified_init.ipp @@ -13,13 +13,13 @@ namespace boost_no_cxx11_unified_initialization_syntax { -struct BasicStruct +struct BasicStruct { int x; double y; }; - -struct AltStruct + +struct AltStruct { public: AltStruct(int x, double y) : x_{x}, y_{y} {} @@ -27,8 +27,8 @@ private: int x_; double y_; }; - -struct IdString + +struct IdString { std::string name; int identifier; @@ -37,7 +37,7 @@ struct IdString return identifier == other.identifier && name == other.name; } }; - + IdString get_string() { return {"SomeName", 4}; //Note the lack of explicit type. @@ -47,6 +47,8 @@ int test() { BasicStruct var1{5, 3.2}; AltStruct var2{2, 4.3}; + (void) var1; + (void) var2; IdString id{"SomeName", 4}; return id == get_string() ? 0 : 1; diff --git a/test/boost_no_using_breaks_adl.ipp b/test/boost_no_using_breaks_adl.ipp index 437d9fdc..e44e285d 100644 --- a/test/boost_no_using_breaks_adl.ipp +++ b/test/boost_no_using_breaks_adl.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -40,7 +40,7 @@ namespace user_ns { return 0; } template - int f(T x) + int f(T x) { // use this as a workaround: //using namespace boost; @@ -60,6 +60,7 @@ int test() typedef void* pv; i = user_ns::f(pv()); i = user_ns::f(boost_ns::inner2::X()); + (void)i; return 0; }