Re: [Boost-bugs] [Boost C++ Libraries] #11897: Compile failure in type_traits_detail::mp_valid_impl with CUDA 7.0

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11897: Compile failure in type_traits_detail::mp_valid_impl with CUDA 7.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-11 13:50:37


#11897: Compile failure in type_traits_detail::mp_valid_impl with CUDA 7.0
-------------------------------+-------------------------
  Reporter: a.grund@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: type_traits
   Version: Boost 1.60.0 | Severity: Showstopper
Resolution: | Keywords:
-------------------------------+-------------------------

Comment (by anonymous):

>Careful with BOOST_WORKAROUND(__CUDACC_VER__, < 70500) please,
 __CUDACC_VER__ is first defined in CUDA 7.5 and will evaluate to undefined
 in previous versions. I guess BOOST_WORKAROUND will not evaluate to true
 in such a case.

 That's what we want - when __CUDACC_VER__ is not defined it evaluates as 0
 when used in a conditional (std mandated behaviour). So if __CUDACC_VER__
 is either undefined or less than the specified version then
 !BOOST_WORKAROUND(__CUDACC_VER__, < 70500) is false and the variadic
 template branch is not taken.

 So 2 questions:

 1) Is there any evidence that variadic template support is causing issues
 elsewhere in Boost?

 2) If I update the patch as below, can someone please test it it?

 {{{
 index c887a89..2b85a39 100644
 --- a/include/boost/type_traits/common_type.hpp
 +++ b/include/boost/type_traits/common_type.hpp
 @@ -18,7 +18,7 @@
  #include <boost/type_traits/detail/common_type_impl.hpp>
  #endif

 -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) &&
 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
 +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) &&
 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &&
 !BOOST_WORKAROUND(__CUDACC_VER__, < 70500)
  #include <boost/type_traits/detail/mp_defer.hpp>
  #endif

 @@ -27,7 +27,7 @@ namespace boost

  // variadic common_type

 -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
 +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &&
 !BOOST_WORKAROUND(__CUDACC_VER__, < 70500)

  template<class... T> struct common_type
  {
 @@ -86,7 +86,7 @@ namespace type_traits_detail

  #if !defined(BOOST_NO_CXX11_DECLTYPE)

 -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) &&
 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
 +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) &&
 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &&
 !BOOST_WORKAROUND(__CUDACC_VER__, < 70500)

  #if !defined(BOOST_MSVC) || BOOST_MSVC > 1800
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11897#comment:7>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC