From 6fd96010140741f2e4faa7a3326f47aade55984a Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Tue, 18 Sep 2018 13:19:20 +0200 Subject: [PATCH 1/6] [CMake] Add minimal cmake file Generate cmake target that can be used by other libraries to express their dependency on this library and retrieve any configuration information such as the include directory, transitive dependencies, necessary compiler options or the required c++ standards level. --- CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7d0dc7d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright 2018 Mike Dev +# Distributed under 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 + +cmake_minimum_required(VERSION 3.5) +project(BoostTypeTraits) + +add_library(boost_type_traits INTERFACE) +add_library(Boost::type_traits ALIAS boost_type_traits) + +target_include_directories(boost_type_traits INTERFACE include) + +target_link_libraries(boost_type_traits + INTERFACE + Boost::config + Boost::static_assert +) + From f146e70e9b073e9faf64f6a3bdc197fd274bd278 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 4 Nov 2018 13:46:32 +0300 Subject: [PATCH 2/6] Fix is_constructible header reference. --- doc/is_constructible.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/is_constructible.qbk b/doc/is_constructible.qbk index 1965410..a90298e 100644 --- a/doc/is_constructible.qbk +++ b/doc/is_constructible.qbk @@ -39,7 +39,7 @@ __compat This trait requires the C++11 features `decltype` variadic templates an While there is some fallback code for cases where this is not the case, the trait should really be considered broken in that case. The header will define the macro `BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING` when the full implementation is available. -__header ` #include ` or ` #include ` +__header ` #include ` or ` #include ` [endsect] From b6351c3def7dfe59ff37b9b18d2de7d65d871eae Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 5 Nov 2018 18:16:57 +0000 Subject: [PATCH 3/6] Fully qualify some names to prevent ambiguity over detail::. --- include/boost/type_traits/is_complete.hpp | 2 +- include/boost/type_traits/is_constructible.hpp | 2 +- include/boost/type_traits/is_default_constructible.hpp | 2 +- include/boost/type_traits/is_destructible.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/type_traits/is_complete.hpp b/include/boost/type_traits/is_complete.hpp index cad04b3..07cb897 100644 --- a/include/boost/type_traits/is_complete.hpp +++ b/include/boost/type_traits/is_complete.hpp @@ -50,7 +50,7 @@ namespace boost { } template struct is_complete - : public integral_constant::type>::value || (sizeof(detail::check_is_complete(0)) != sizeof(char))> {}; + : public integral_constant::type>::value || (sizeof(boost::detail::check_is_complete(0)) != sizeof(char))> {}; #elif !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) diff --git a/include/boost/type_traits/is_constructible.hpp b/include/boost/type_traits/is_constructible.hpp index da62599..6969cd6 100644 --- a/include/boost/type_traits/is_constructible.hpp +++ b/include/boost/type_traits/is_constructible.hpp @@ -51,7 +51,7 @@ namespace boost{ { BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value, "The target type must be complete in order to test for constructibility"); }; - template struct is_constructible : public integral_constant::value && sizeof(detail::is_constructible_imp::test1(0)) == sizeof(boost::type_traits::yes_type)> + template struct is_constructible : public integral_constant::value && sizeof(boost::detail::is_constructible_imp::test1(0)) == sizeof(boost::type_traits::yes_type)> { BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value, "The target type must be complete in order to test for constructibility"); }; diff --git a/include/boost/type_traits/is_default_constructible.hpp b/include/boost/type_traits/is_default_constructible.hpp index 9a4a0a7..04c023f 100644 --- a/include/boost/type_traits/is_default_constructible.hpp +++ b/include/boost/type_traits/is_default_constructible.hpp @@ -58,7 +58,7 @@ namespace boost{ BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_default_constructible must be complete types"); }; #else - template struct is_default_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> + template struct is_default_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> { BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_default_constructible must be complete types"); }; diff --git a/include/boost/type_traits/is_destructible.hpp b/include/boost/type_traits/is_destructible.hpp index cc72fb7..c32e758 100644 --- a/include/boost/type_traits/is_destructible.hpp +++ b/include/boost/type_traits/is_destructible.hpp @@ -34,7 +34,7 @@ namespace boost{ } - template struct is_destructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> + template struct is_destructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> { BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_destructible must be complete types"); }; From b8e0395cd8ab4a236764bf5eb8d55e3b5bda1343 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 6 Nov 2018 19:37:09 +0000 Subject: [PATCH 4/6] Add CI badges. [CI SKIP] --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7673472..62b1329 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ volatile qualifier from a type. Each class that performs a transformation define The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/type_traits/index.html). +| | Master | Develop | +|------------------|----------|-------------| +| Travis | [![Build Status](https://travis-ci.org/boostorg/type_traits.svg?branch=master)](https://travis-ci.org/boostorg/type_traits) | [![Build Status](https://travis-ci.org/boostorg/type_traits.svg)](https://travis-ci.org/boostorg/type_traits) | +| Appveyor | [![Build status](https://ci.appveyor.com/api/projects/status/lwjqu4087qiolje8/branch/master?svg=true)](https://ci.appveyor.com/project/jzmaddock/type-traits/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/lwjqu4087qiolje8/branch/develop?svg=true)](https://ci.appveyor.com/project/jzmaddock/type-traits/branch/develop) | + + ## Support, bugs and feature requests ## Bugs and feature requests can be reported through the [Gitub issue tracker](https://github.com/boostorg/type_traits/issues) From d49f6e05f521be206d0451567e7fa224496ab14c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 26 Nov 2018 17:41:45 +0000 Subject: [PATCH 5/6] Fix use of BOOST_WORKAROUND in config.hpp, should be BOOST_GCC < 40900 rather than <= 40800 in case there is a patch level. Fixes: https://github.com/boostorg/type_traits/issues/97 --- include/boost/type_traits/detail/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 9cd1934..7c6149e 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -81,7 +81,7 @@ // // Can we implement accurate is_function/is_member_function_pointer (post C++03)? // -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, <= 40800)\ +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4) # define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION #endif From 19bc3525a3193b026bca5f3afb25c25ddd7cbb47 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 26 Nov 2018 17:51:00 +0000 Subject: [PATCH 6/6] config.hpp: change workaround to < gcc-4.8.5 rather than < 4.9. See https://github.com/boostorg/type_traits/issues/97. --- include/boost/type_traits/detail/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 7c6149e..dd4ec4c 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -81,7 +81,7 @@ // // Can we implement accurate is_function/is_member_function_pointer (post C++03)? // -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)\ +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40805)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4) # define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION #endif