Add BOOST_NO_CXX11_POINTER_TRAITS

This commit is contained in:
Glen Fernandes committed 2017-05-19 13:29:52 -04:00
1 parent 8c102bcaa7
commit 219c351cb4
20 files changed
+156 -4

No files matched your search

+4 -1
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 ] ;
+37
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 */
+2
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
+11 -1
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;
+37
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();
}
+37
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();
}