id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11897,Compile failure in type_traits_detail::mp_valid_impl with CUDA 7.0,a.grund@…,John Maddock,"Including boost/thread/pthread/timespec.hpp and compiling with nvcc 7.0 in C++11 mode throws several errors related to mp_valid_impl. This bug seems to be a compiler bug which is fixed in CUDA 7.5 but as many HPC system only have (and will have) 7.0 this is a real showstopper. Log output is: {{{ /opt/pkg/devel/cuda/7.0/bin/nvcc -std=c++11 BoostMpValid.cu /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/detail/mp_defer.hpp(33): error: no instance of overloaded function ""boost::type_traits_detail::mp_valid_impl::check [with F=boost::type_traits_detail::common_type_fold, T=]"" matches the argument list argument types are: (int) detected during: instantiation of class ""boost::type_traits_detail::mp_valid_impl [with F=boost::type_traits_detail::common_type_fold, T=]"" (37): here instantiation of type ""boost::type_traits_detail::mp_valid"" (50): here instantiation of type ""boost::type_traits_detail::mp_defer"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(47): here instantiation of class ""boost::common_type [with T1=int_least64_t, T2=int_least64_t, T=]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(256): here instantiation of ""ToDuration boost::chrono::detail::duration_cast_aux::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds, Period=boost::ratio<1L, 1000000000L>]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(315): here instantiation of ""ToDuration boost::chrono::detail::duration_cast::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(789): here instantiation of ""boost::enable_if, ToDuration>::type boost::chrono::duration_cast(const boost::chrono::duration &) [with ToDuration=boost::chrono::seconds, Rep=int_least64_t, Period=boost::nano]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/thread/pthread/timespec.hpp(51): here /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/detail/mp_defer.hpp(50): error: name followed by ""::"" must be a class or namespace name detected during: instantiation of type ""boost::type_traits_detail::mp_defer"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(47): here instantiation of class ""boost::common_type [with T1=int_least64_t, T2=int_least64_t, T=]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(256): here instantiation of ""ToDuration boost::chrono::detail::duration_cast_aux::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds, Period=boost::ratio<1L, 1000000000L>]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(315): here instantiation of ""ToDuration boost::chrono::detail::duration_cast::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(789): here instantiation of ""boost::enable_if, ToDuration>::type boost::chrono::duration_cast(const boost::chrono::duration &) [with ToDuration=boost::chrono::seconds, Rep=int_least64_t, Period=boost::nano]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/thread/pthread/timespec.hpp(51): here /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/detail/mp_defer.hpp(33): error: no instance of overloaded function ""boost::type_traits_detail::mp_valid_impl::check [with F=boost::type_traits_detail::builtin_common_type, T=]"" matches the argument list argument types are: (int) detected during: instantiation of class ""boost::type_traits_detail::mp_valid_impl [with F=boost::type_traits_detail::builtin_common_type, T=]"" (37): here instantiation of type ""boost::type_traits_detail::mp_valid"" (50): here instantiation of type ""boost::type_traits_detail::mp_defer"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(96): here instantiation of class ""boost::type_traits_detail::common_type_impl [with T1=int_least64_t, T2=int_least64_t]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(132): here instantiation of class ""boost::type_traits_detail::common_type_decay_helper [with T1=int_least64_t, T2=int_least64_t]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(138): here [ 3 instantiation contexts not shown ] instantiation of class ""boost::type_traits_detail::mp_defer_impl [with F=boost::type_traits_detail::common_type_fold, T=]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(47): here instantiation of class ""boost::common_type [with T1=int_least64_t, T2=int_least64_t, T=]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(256): here instantiation of ""ToDuration boost::chrono::detail::duration_cast_aux::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds, Period=boost::ratio<1L, 1000000000L>]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(315): here instantiation of ""ToDuration boost::chrono::detail::duration_cast::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(789): here instantiation of ""boost::enable_if, ToDuration>::type boost::chrono::duration_cast(const boost::chrono::duration &) [with ToDuration=boost::chrono::seconds, Rep=int_least64_t, Period=boost::nano]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/thread/pthread/timespec.hpp(51): here /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/detail/mp_defer.hpp(50): error: name followed by ""::"" must be a class or namespace name detected during: instantiation of type ""boost::type_traits_detail::mp_defer"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(96): here instantiation of class ""boost::type_traits_detail::common_type_impl [with T1=int_least64_t, T2=int_least64_t]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(132): here instantiation of class ""boost::type_traits_detail::common_type_decay_helper [with T1=int_least64_t, T2=int_least64_t]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(138): here instantiation of class ""boost::common_type [with T1=int_least64_t, T2=int_least64_t]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(37): here instantiation of type ""boost::common_type_t"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(42): here instantiation of type ""boost::type_traits_detail::common_type_fold"" (47): here instantiation of class ""boost::type_traits_detail::mp_defer_impl [with F=boost::type_traits_detail::common_type_fold, T=]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/type_traits/common_type.hpp(47): here instantiation of class ""boost::common_type [with T1=int_least64_t, T2=int_least64_t, T=]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(256): here instantiation of ""ToDuration boost::chrono::detail::duration_cast_aux::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds, Period=boost::ratio<1L, 1000000000L>]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(315): here instantiation of ""ToDuration boost::chrono::detail::duration_cast::operator()(const FromDuration &) const [with FromDuration=boost::chrono::duration, ToDuration=boost::chrono::seconds]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/chrono/duration.hpp(789): here instantiation of ""boost::enable_if, ToDuration>::type boost::chrono::duration_cast(const boost::chrono::duration &) [with ToDuration=boost::chrono::seconds, Rep=int_least64_t, Period=boost::nano]"" /opt/pkg/devel/boost/1.60.0/gnu/4.8.2/64/opt/include/boost/thread/pthread/timespec.hpp(51): here }}} I have reduced it to the following MWE which gives the same error (CUDA 7.0, Boost 1.60): {{{ #include #include int main(){ boost::common_type::type i; } }}} ",Bugs,closed,Boost 1.63.0,type_traits,Boost 1.60.0,Showstopper,fixed,,