Files
type_traits/test/Jamfile.v2
jzmaddock ac351390b2 Assert when we try to use an incomplete type on a trait which requires complete types as arguments.
This prevents some traits from doing the wrong thing (ie compiling but giving the wrong answer when handed an incomplete type.
See https://svn.boost.org/trac10/ticket/12285.
A by-product of this is we add is_complete as a new trait.
2018-02-04 10:03:30 +00:00

59 lines
1.8 KiB
Plaintext

# copyright John Maddock 2004
# 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)
# bring in the rules for testing
import testing ;
import os ;
if [ os.environ CI ]
{
CI_DEFINES = <define>CI_SUPPRESS_KNOWN_ISSUES=1 ;
}
# type_traits in V1 seem to have two modes: standalone, triggered
# by a command line option, and a regular. For now, just imitate
# regular
project : requirements
# default to all warnings on:
<warnings>all
# set warnings as errors for those compilers we know we get warning free:
<toolset>gcc:<cxxflags>-Wextra
<toolset>gcc:<cxxflags>-Wno-uninitialized
<toolset>gcc:<cxxflags>-Wno-int-in-bool-context
<toolset>gcc:<cxxflags>-Wno-bool-operation
<toolset>gcc:<warnings-as-errors>on
<toolset>intel:<warnings-as-errors>on
<toolset>sun:<warnings-as-errors>on
<toolset>msvc:<warnings-as-errors>on
<include>libs/tt2/light/include
$(CI_DEFINES)
;
rule all-tests {
local result ;
for local source in [ glob *_test*.cpp ]
{
result += [ run $(source) ] ;
}
for local source in [ glob compile_fail/*.cpp ]
{
result += [ compile-fail $(source) ] ;
}
#
# These traits have both intrinsic support, and a std conforming version, test a version with intrinsics disabled for better code coverage:
#
for local source in has_nothrow_assign_test has_nothrow_constr_test has_nothrow_copy_test is_nothrow_move_assignable_test is_nothrow_move_constructible_test
{
result += [ run $(source).cpp : : : <define>BOOST_TT_DISABLE_INTRINSICS : $(source)_no_intrinsics ] ;
}
return $(result) ;
}
test-suite type_traits : [ all-tests ] ;