Add BOOST_NO_CXX11_POINTER_TRAITS

This commit is contained in:
Glen Fernandes
2017-05-17 01:07:18 -04:00
parent 8c102bcaa7
commit 219c351cb4
20 changed files with 156 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Mon Apr 17 18:35:54 2017
# This file was automatically generated on Wed May 17 01:29:40 2017
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@ -107,6 +107,7 @@ obj cxx11_hdr_unordered_set : test_case.cpp : <define>TEST_BOOST_NO_CXX11_HDR_UN
obj cxx11_inline_namespaces : test_case.cpp : <define>TEST_BOOST_NO_CXX11_INLINE_NAMESPACES ;
obj cxx11_non_public_defaulted_functions : test_case.cpp : <define>TEST_BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS ;
obj cxx11_numeric_limits : test_case.cpp : <define>TEST_BOOST_NO_CXX11_NUMERIC_LIMITS ;
obj cxx11_pointer_traits : test_case.cpp : <define>TEST_BOOST_NO_CXX11_POINTER_TRAITS ;
obj cxx11_ref_qualifiers : test_case.cpp : <define>TEST_BOOST_NO_CXX11_REF_QUALIFIERS ;
obj cxx11_sfinae_expr : test_case.cpp : <define>TEST_BOOST_NO_CXX11_SFINAE_EXPR ;
obj cxx11_smart_ptr : test_case.cpp : <define>TEST_BOOST_NO_CXX11_SMART_PTR ;

View File

@ -1,4 +1,4 @@
// This file was automatically generated on Mon Apr 17 18:35:54 2017
// This file was automatically generated on Wed May 17 01:29:40 2017
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@ -491,6 +491,11 @@
# error "Defect macro BOOST_NO_CXX11_NUMERIC_LIMITS is defined."
# endif
#endif
#ifdef TEST_BOOST_NO_CXX11_POINTER_TRAITS
# ifdef BOOST_NO_CXX11_POINTER_TRAITS
# error "Defect macro BOOST_NO_CXX11_POINTER_TRAITS is defined."
# endif
#endif
#ifdef TEST_BOOST_NO_CXX11_REF_QUALIFIERS
# ifdef BOOST_NO_CXX11_REF_QUALIFIERS
# error "Defect macro BOOST_NO_CXX11_REF_QUALIFIERS is defined."

View File

@ -680,6 +680,8 @@ compilers implementing an early draft of the C++11 standard (in particular, inco
[[`BOOST_NO_CXX11_NUMERIC_LIMITS`][The standard library `<limits>` header does
not support the C++11 version of `numeric_limits`.
]]
[[`BOOST_NO_CXX11_POINTER_TRAITS`][The standard library does not provide a
C++11 version of `std::pointer_traits` in <memory>.]]
[[`BOOST_NO_CXX11_RANGE_BASED_FOR`][The compiler does not support
range-based for statements.
]]

View File

@ -147,6 +147,13 @@
# define BOOST_NO_CXX11_STD_ALIGN
#endif
// Before 650 std::pointer_traits has a broken rebind template
#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650
# define BOOST_NO_CXX11_POINTER_TRAITS
#elif defined(BOOST_MSVC) && BOOST_MSVC < 1910
# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX

View File

@ -55,6 +55,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -29,6 +29,7 @@
// aliases since members rebind_alloc and rebind_traits require it.
#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
#if __cplusplus < 201103
@ -53,6 +54,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_STD_ALIGN

View File

@ -231,6 +231,7 @@ extern "C" char *gets (char *__s);
// so 4.7.0 is the first truly conforming one.
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
// C++0x features in GCC 4.8.0 and later
//

View File

@ -44,6 +44,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -68,6 +68,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -180,6 +180,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -138,6 +138,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -228,6 +228,7 @@ namespace boost { using std::min; using std::max; }
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -44,6 +44,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL

View File

@ -31,6 +31,7 @@
#define BOOST_NO_CXX11_ATOMIC_SMART_PTR
#define BOOST_NO_CXX11_NUMERIC_LIMITS
#define BOOST_NO_CXX11_ALLOCATOR
#define BOOST_NO_CXX11_POINTER_TRAITS
#define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_NO_CXX11_HDR_UNORDERED_SET
#define BOOST_NO_CXX11_HDR_UNORDERED_MAP

View File

@ -1,7 +1,7 @@
#
# Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Mon Apr 17 18:35:54 2017
# This file was automatically generated on Wed May 17 01:29:40 2017
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@ -310,6 +310,9 @@ test-suite "BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS" :
test-suite "BOOST_NO_CXX11_NUMERIC_LIMITS" :
[ run ../no_cxx11_numeric_limits_pass.cpp ]
[ compile-fail ../no_cxx11_numeric_limits_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_POINTER_TRAITS" :
[ run ../no_cxx11_pointer_traits_pass.cpp ]
[ compile-fail ../no_cxx11_pointer_traits_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_REF_QUALIFIERS" :
[ run ../no_cxx11_ref_qualifiers_pass.cpp ]
[ compile-fail ../no_cxx11_ref_qualifiers_fail.cpp ] ;

View File

@ -0,0 +1,37 @@
/*
Copyright 2017 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
// MACRO: BOOST_NO_CXX11_POINTER_TRAITS
// TITLE: C++11 <memory> lacks a correct std::pointer_traits
// DESCRIPTION: The standard library lacks a working std::pointer_traits.
#include <memory>
namespace boost_no_cxx11_pointer_traits {
template<class T>
struct pointer {
template<class U>
using rebind = pointer<bool>;
};
template<class T>
struct result { };
template<>
struct result<pointer<bool> > {
static const int value = 0;
};
int test()
{
return result<std::pointer_traits<pointer<int> >::rebind<char> >::value;
}
} /* boost_no_cxx11_pointer_traits */

View File

@ -1048,6 +1048,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_NULLPTR);
PRINT_MACRO(BOOST_NO_CXX11_NUMERIC_LIMITS);
PRINT_MACRO(BOOST_NO_CXX11_POINTER_TRAITS);
PRINT_MACRO(BOOST_NO_CXX11_RANGE_BASED_FOR);
PRINT_MACRO(BOOST_NO_CXX11_RAW_LITERALS);
PRINT_MACRO(BOOST_NO_CXX11_REF_QUALIFIERS);
@ -1163,6 +1164,7 @@ void print_boost_macros()
// END GENERATED BLOCK

View File

@ -1,4 +1,4 @@
// This file was automatically generated on Mon Apr 17 18:35:54 2017
// This file was automatically generated on Wed May 17 01:29:40 2017
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@ -237,6 +237,11 @@ namespace boost_no_cxx11_non_public_defaulted_functions = empty_boost;
#else
namespace boost_no_cxx11_numeric_limits = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_POINTER_TRAITS
#include "boost_no_cxx11_pointer_traits.ipp"
#else
namespace boost_no_cxx11_pointer_traits = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
#include "boost_no_cxx11_ref_qualifiers.ipp"
#else
@ -1521,6 +1526,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_CXX11_NUMERIC_LIMITS at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_pointer_traits::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_POINTER_TRAITS at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_ref_qualifiers::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_REF_QUALIFIERS at: " << __FILE__ << ":" << __LINE__ << std::endl;

View File

@ -0,0 +1,37 @@
// This file was automatically generated on Wed May 17 01:29:39 2017
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// 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 the most recent version.//
// Revision $Id$
//
// Test file for macro BOOST_NO_CXX11_POINTER_TRAITS
// This file should not compile, if it does then
// BOOST_NO_CXX11_POINTER_TRAITS should not be defined.
// See file boost_no_cxx11_pointer_traits.ipp for details
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifdef BOOST_NO_CXX11_POINTER_TRAITS
#include "boost_no_cxx11_pointer_traits.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx11_pointer_traits::test();
}

View File

@ -0,0 +1,37 @@
// This file was automatically generated on Wed May 17 01:29:39 2017
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// 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 the most recent version.//
// Revision $Id$
//
// Test file for macro BOOST_NO_CXX11_POINTER_TRAITS
// This file should compile, if it does not then
// BOOST_NO_CXX11_POINTER_TRAITS should be defined.
// See file boost_no_cxx11_pointer_traits.ipp for details
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifndef BOOST_NO_CXX11_POINTER_TRAITS
#include "boost_no_cxx11_pointer_traits.ipp"
#else
namespace boost_no_cxx11_pointer_traits = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx11_pointer_traits::test();
}