forked from boostorg/type_index
Fix issues found by inspect too and add it to CI
This commit is contained in:
13
.travis.yml
13
.travis.yml
@ -2,13 +2,13 @@
|
||||
# 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)
|
||||
#
|
||||
# Copyright 2014-2019 Antony Polukhin.
|
||||
# Copyright Antony Polukhin 2014-2019.
|
||||
|
||||
#
|
||||
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
|
||||
# and how it can be used with Boost libraries.
|
||||
#
|
||||
# File revision #9
|
||||
# File revision #10
|
||||
|
||||
sudo: false
|
||||
language: cpp
|
||||
@ -82,20 +82,22 @@ addons:
|
||||
before_install:
|
||||
# Cloning minimal set of Boost libraries
|
||||
- BOOST=$HOME/boost-local
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git $BOOST
|
||||
- git clone -b $BOOST_BRANCH --depth 10 https://github.com/boostorg/boost.git $BOOST
|
||||
- cd $BOOST
|
||||
- git submodule update --init --depth 1 tools/build tools/boostdep
|
||||
- git submodule update --init --depth 10 --jobs 2 tools/build tools/boostdep tools/inspect libs/filesystem
|
||||
|
||||
# Replacing Boost module with this project and installing Boost dependencies
|
||||
- echo "Testing $BOOST/libs/$BOOST_LIBS_FOLDER moved from $TRAVIS_BUILD_DIR, branch $BOOST_BRANCH"
|
||||
- rm -rf $BOOST/libs/$BOOST_LIBS_FOLDER || true
|
||||
- mv $TRAVIS_BUILD_DIR $BOOST/libs/$BOOST_LIBS_FOLDER
|
||||
- python tools/boostdep/depinst/depinst.py --git_args "--depth 1 --jobs 2" $BOOST_LIBS_FOLDER
|
||||
- python tools/boostdep/depinst/depinst.py --git_args "--depth 10 --jobs 2" $BOOST_LIBS_FOLDER
|
||||
- python tools/boostdep/depinst/depinst.py --git_args "--depth 10 --jobs 2" $BOOST/libs/filesystem
|
||||
- git status
|
||||
|
||||
# Adding missing toolsets and preparing Boost headers
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
- ./b2 -j4 variant=debug tools/inspect/build
|
||||
- |-
|
||||
echo "using gcc ;" >> ~/user-config.jam
|
||||
echo "using clang ;" >> ~/user-config.jam
|
||||
@ -110,6 +112,7 @@ before_install:
|
||||
|
||||
script:
|
||||
- sh -c "../../../b2 -j2 $B2_ARGS"
|
||||
- ../../../dist/bin/inspect . # inspect tool run
|
||||
|
||||
after_success:
|
||||
# Copying Coveralls data to a separate folder
|
||||
|
@ -83,7 +83,7 @@ inline type_index runtime_class_construct_type_id(T const*) {
|
||||
/// \param base_class_seq A Boost.Preprocessor sequence of the current class' direct bases, or
|
||||
/// BOOST_TYPE_INDEX_NO_BASE_CLASS if this class has no direct base classes.
|
||||
#define BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS(base_class_seq) \
|
||||
BOOST_TYPE_INDEX_REGISTER_CLASS \
|
||||
BOOST_TYPE_INDEX_REGISTER_CLASS \
|
||||
BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST(base_class_seq)
|
||||
|
||||
/// \def BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright Klemens Morgenstern, 2012-2015.
|
||||
// Copyright Antony Polukhin, 2019.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -31,26 +31,26 @@ struct my_template {};
|
||||
template<typename T>
|
||||
void compare()
|
||||
{
|
||||
typedef boost::typeindex::ctti_type_index ctti;
|
||||
typedef boost::typeindex::stl_type_index stl;
|
||||
BOOST_TEST_EQ(
|
||||
ctti::type_id<int>().pretty_name(),
|
||||
stl::type_id<int>().pretty_name()
|
||||
);
|
||||
typedef boost::typeindex::ctti_type_index ctti;
|
||||
typedef boost::typeindex::stl_type_index stl;
|
||||
BOOST_TEST_EQ(
|
||||
ctti::type_id<int>().pretty_name(),
|
||||
stl::type_id<int>().pretty_name()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
compare<void>();
|
||||
compare<int>();
|
||||
compare<double*>();
|
||||
compare<const double&>();
|
||||
compare<my_namespace1::my_class>();
|
||||
compare<void>();
|
||||
compare<int>();
|
||||
compare<double*>();
|
||||
compare<const double&>();
|
||||
compare<my_namespace1::my_class>();
|
||||
|
||||
compare<my_namespace3::my_template<
|
||||
my_namespace1::my_class,
|
||||
my_namespace2::my_class> >();
|
||||
compare<my_namespace3::my_template<
|
||||
my_namespace1::my_class,
|
||||
my_namespace2::my_class> >();
|
||||
|
||||
|
||||
return boost::report_errors();
|
||||
@ -60,7 +60,7 @@ int main()
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user