diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fbd0db9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,69 @@ +# Copyright 2016 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +language: cpp + +sudo: false + +os: + - linux + - osx + +branches: + only: + - master + - develop + +install: + - cd .. + - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule init libs/algorithm + - git submodule init libs/align + - git submodule init libs/assert + - git submodule init libs/bind + - git submodule init libs/chrono + - git submodule init libs/config + - git submodule init libs/core + - git submodule init libs/detail + - git submodule init libs/exception + - git submodule init libs/integer + - git submodule init libs/io + - git submodule init libs/iterator + - git submodule init libs/lambda + - git submodule init libs/move + - git submodule init libs/mpl + - git submodule init libs/numeric/conversion + - git submodule init libs/predef + - git submodule init libs/preprocessor + - git submodule init libs/range + - git submodule init libs/ratio + - git submodule init libs/rational + - git submodule init libs/smart_ptr + - git submodule init libs/static_assert + - git submodule init libs/system + - git submodule init libs/optional + - git submodule init libs/test + - git submodule init libs/throw_exception + - git submodule init libs/timer + - git submodule init libs/tuple + - git submodule init libs/type_index + - git submodule init libs/type_traits + - git submodule init libs/typeof + - git submodule init libs/utility + - git submodule init libs/winapi + - git submodule init tools/build + - git submodule update --depth 1 + - cp -r $TRAVIS_BUILD_DIR/* libs/function + - ./bootstrap.sh + - ./b2 headers + +script: + - TOOLSET=gcc,clang + - if [ $TRAVIS_OS_NAME == osx ]; then TOOLSET=clang; fi + - ./b2 libs/function/test toolset=$TOOLSET + +notifications: + email: + on_success: always diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 82c81d7..7984c83 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -656,17 +656,6 @@ namespace boost { BOOST_FUNCTION_TEMPLATE_PARMS > class BOOST_FUNCTION_FUNCTION : public function_base - -#if BOOST_FUNCTION_NUM_ARGS == 1 - - , public std::unary_function - -#elif BOOST_FUNCTION_NUM_ARGS == 2 - - , public std::binary_function - -#endif - { public: #ifndef BOOST_NO_VOID_RETURNS diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f3f13c5..6f3cd0b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -66,6 +66,8 @@ import testing ; [ run libs/function/test/rvalues_test.cpp : : : : ] [ compile libs/function/test/function_typeof_test.cpp ] + + [ run libs/function/test/result_arg_types_test.cpp ] ; } diff --git a/test/result_arg_types_test.cpp b/test/result_arg_types_test.cpp new file mode 100644 index 0000000..33ccddc --- /dev/null +++ b/test/result_arg_types_test.cpp @@ -0,0 +1,40 @@ +// Boost.Function library + +// Copyright 2016 Peter Dimov + +// Use, modification and distribution is 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) + +#include +#include +#include + +struct X +{ +}; + +struct Y +{ +}; + +struct Z +{ +}; + +int main() +{ + typedef boost::function F1; + + BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); + + typedef boost::function F2; + + BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); + + return boost::report_errors(); +}