Merge branch 'boost_no_cxx11_sfinae_expr' of https://github.com/glenfe/config into pr114

# Fixed Conflicts:
#	checks/Jamfile.v2
#	checks/test_case.cpp
#	test/all/Jamfile.v2
#	test/config_test.cpp

Also added some more documentation to tie together the various SFINAE macros.  Regenerated the docs.
This commit is contained in:
jzmaddock
2017-02-05 19:38:35 +00:00
27 changed files with 197 additions and 10 deletions
+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 Sun Feb 5 18:12:09 2017
# This file was automatically generated on Sun Feb 5 19:09:22 2017
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@@ -313,6 +313,9 @@ test-suite "BOOST_NO_CXX11_NUMERIC_LIMITS" :
test-suite "BOOST_NO_CXX11_REF_QUALIFIERS" :
[ run ../no_cxx11_ref_qualifiers_pass.cpp ]
[ compile-fail ../no_cxx11_ref_qualifiers_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_SFINAE_EXPR" :
[ run ../no_cxx11_sfinae_expr_pass.cpp ]
[ compile-fail ../no_cxx11_sfinae_expr_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_SMART_PTR" :
[ run ../no_cxx11_smart_ptr_pass.cpp ]
[ compile-fail ../no_cxx11_smart_ptr_fail.cpp ] ;
+48
View File
@@ -0,0 +1,48 @@
/*
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_SFINAE_EXPR
// TITLE: C++11 SFINAE for expressions
// DESCRIPTION: C++11 SFINAE for expressions not supported.
namespace boost_no_cxx11_sfinae_expr {
template<class>
struct ignore {
typedef void type;
};
template<class T>
T& object();
template<class T, class E = void>
struct trait {
static const int value = 0;
};
template<class T>
struct trait<T, typename ignore<decltype(&object<T>())>::type> {
static const int value = 1;
};
template<class T>
struct result {
static const int value = T::value;
};
class type {
void operator&() const { }
};
int test()
{
return result<trait<type> >::value;
}
} /* boost_no_cxx11_sfinae_expr */
+2
View File
@@ -1053,6 +1053,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_CXX11_REF_QUALIFIERS);
PRINT_MACRO(BOOST_NO_CXX11_RVALUE_REFERENCES);
PRINT_MACRO(BOOST_NO_CXX11_SCOPED_ENUMS);
PRINT_MACRO(BOOST_NO_CXX11_SFINAE_EXPR);
PRINT_MACRO(BOOST_NO_CXX11_SMART_PTR);
PRINT_MACRO(BOOST_NO_CXX11_STATIC_ASSERT);
PRINT_MACRO(BOOST_NO_CXX11_STD_ALIGN);
@@ -1151,6 +1152,7 @@ void print_boost_macros()
// END GENERATED BLOCK
PRINT_MACRO(BOOST_INTEL);
+11 -1
View File
@@ -1,4 +1,4 @@
// This file was automatically generated on Sun Feb 5 18:12:09 2017
// This file was automatically generated on Sun Feb 5 19:09:22 2017
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@@ -242,6 +242,11 @@ namespace boost_no_cxx11_numeric_limits = empty_boost;
#else
namespace boost_no_cxx11_ref_qualifiers = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_SFINAE_EXPR
#include "boost_no_cxx11_sfinae_expr.ipp"
#else
namespace boost_no_cxx11_sfinae_expr = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_SMART_PTR
#include "boost_no_cxx11_smart_ptr.ipp"
#else
@@ -1506,6 +1511,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_CXX11_REF_QUALIFIERS at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_sfinae_expr::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_SFINAE_EXPR at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_smart_ptr::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_SMART_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl;
+37
View File
@@ -0,0 +1,37 @@
// This file was automatically generated on Sat Feb 4 00:49:07 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_SFINAE_EXPR
// This file should not compile, if it does then
// BOOST_NO_CXX11_SFINAE_EXPR should not be defined.
// See file boost_no_cxx11_sfinae_expr.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_SFINAE_EXPR
#include "boost_no_cxx11_sfinae_expr.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx11_sfinae_expr::test();
}
+37
View File
@@ -0,0 +1,37 @@
// This file was automatically generated on Sat Feb 4 00:49:07 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_SFINAE_EXPR
// This file should compile, if it does not then
// BOOST_NO_CXX11_SFINAE_EXPR should be defined.
// See file boost_no_cxx11_sfinae_expr.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_SFINAE_EXPR
#include "boost_no_cxx11_sfinae_expr.ipp"
#else
namespace boost_no_cxx11_sfinae_expr = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx11_sfinae_expr::test();
}