forked from boostorg/config
Implement BOOST_OVERRIDE
This commit is contained in:
@@ -110,6 +110,7 @@ test-suite config
|
||||
[ run helper_macros_test.cpp ]
|
||||
[ compile pragma_message_test.cpp ]
|
||||
[ compile header_deprecated_test.cpp ]
|
||||
[ compile boost_override_test.cpp ]
|
||||
;
|
||||
|
||||
obj has_clang_implicit_fallthrough : cmd_line_check.cpp :
|
||||
|
||||
+4
-1
@@ -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 Dec 09 09:47:37 2019
|
||||
# This file was automatically generated on Thu Apr 9 14:27:07 2020
|
||||
# by libs/config/tools/generate.cpp
|
||||
# Copyright John Maddock.
|
||||
# Use, modification and distribution are subject to the
|
||||
@@ -268,6 +268,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_OVERRIDE" :
|
||||
[ run ../no_cxx11_override_pass.cpp ]
|
||||
[ compile-fail ../no_cxx11_override_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_CXX11_POINTER_TRAITS" :
|
||||
[ run ../no_cxx11_pointer_traits_pass.cpp ]
|
||||
[ compile-fail ../no_cxx11_pointer_traits_fail.cpp ] ;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2020 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_OVERRIDE
|
||||
// TITLE: C++11 SFINAE for expressions
|
||||
// DESCRIPTION: C++11 SFINAE for expressions not supported.
|
||||
|
||||
namespace boost_no_cxx11_override {
|
||||
|
||||
struct base {
|
||||
virtual void first() = 0;
|
||||
virtual void second() { }
|
||||
};
|
||||
|
||||
struct derived
|
||||
: base {
|
||||
void first() override { }
|
||||
void second() override { }
|
||||
};
|
||||
|
||||
int test()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
} /* boost_no_cxx11_override */
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
Copyright 2020 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#include <boost/config.hpp>
|
||||
|
||||
struct base {
|
||||
virtual void first() = 0;
|
||||
virtual void second() { }
|
||||
};
|
||||
|
||||
struct derived
|
||||
: base {
|
||||
void first() BOOST_OVERRIDE { }
|
||||
void second() BOOST_OVERRIDE { }
|
||||
};
|
||||
@@ -1131,6 +1131,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_OVERRIDE);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_POINTER_TRAITS);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_RANGE_BASED_FOR);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_RAW_LITERALS);
|
||||
@@ -1234,6 +1235,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_VOID_RETURNS);
|
||||
|
||||
|
||||
|
||||
// END GENERATED BLOCK
|
||||
|
||||
PRINT_MACRO(BOOST_INTEL);
|
||||
|
||||
+11
-1
@@ -1,4 +1,4 @@
|
||||
// This file was automatically generated on Mon Dec 09 09:47:37 2019
|
||||
// This file was automatically generated on Thu Apr 9 14:27:07 2020
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
@@ -247,6 +247,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_OVERRIDE
|
||||
#include "boost_no_cxx11_override.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx11_override = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_POINTER_TRAITS
|
||||
#include "boost_no_cxx11_pointer_traits.ipp"
|
||||
#else
|
||||
@@ -1431,6 +1436,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_override::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_NO_CXX11_OVERRIDE 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;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Thu Apr 9 14:27:07 2020
|
||||
// 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_OVERRIDE
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_CXX11_OVERRIDE should not be defined.
|
||||
// See file boost_no_cxx11_override.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_OVERRIDE
|
||||
#include "boost_no_cxx11_override.ipp"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx11_override::test();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Thu Apr 9 14:27:07 2020
|
||||
// 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_OVERRIDE
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_CXX11_OVERRIDE should be defined.
|
||||
// See file boost_no_cxx11_override.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_OVERRIDE
|
||||
#include "boost_no_cxx11_override.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx11_override = empty_boost;
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx11_override::test();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user