Subject: [Boost-bugs] [Boost C++ Libraries] #4530: errors with is_convertible on msvc10
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-11 21:58:25
#4530: errors with is_convertible on msvc10
-------------------------------------+--------------------------------------
Reporter: cschmidt | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: type_traits
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
{{{
#include <boost/spirit/include/qi.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <type_traits>
template<typename T>
struct test
{
template<typename A>
test(A&&, typename boost::enable_if<boost::is_convertible<A&&, T>
>::type* =0);
};
int main()
{
typedef
boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,true,false>
A;
boost::is_convertible<test<A>, A>::value;
//std::tr1::is_convertible<test<A>, A>::value;
}
}}}
This snippet fails on msvc10 with the following errors:
{{{
1>z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(295): error C2039: 'value'
: is not a member of 'boost::detail::is_convertible_basic_impl<From,To>'
1> with
1> [
1> From=test<A> ,
1> To=A
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(372) : see reference to
class template instantiation 'boost::detail::is_convertible_impl<From,To>'
being compiled
1> with
1> [
1> From=test<A> ,
1> To=A
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(418) : see reference to
class template instantiation
'boost::detail::is_convertible_impl_dispatch<From,To>' being compiled
1> with
1> [
1> From=test<A> ,
1> To=A
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\utility\enable_if.hpp(36) : see reference to class
template instantiation 'boost::is_convertible<From,To>' being compiled
1> with
1> [
1> From=test<A> &,
1> To=A
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(263) : see reference to
class template instantiation 'boost::enable_if<Cond,T>' being compiled
1> with
1> [
1> Cond=boost::is_convertible<test<A> &,A>,
1> T=void
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(295) : see reference to
class template instantiation
'boost::detail::is_convertible_basic_impl<From,To>' being compiled
1> with
1> [
1> From=test<A> ,
1> To=A
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(372) : see reference to
class template instantiation 'boost::detail::is_convertible_impl<From,To>'
being compiled
1> with
1> [
1> From=test<A>,
1> To=A
1> ]
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(418) : see reference to
class template instantiation
'boost::detail::is_convertible_impl_dispatch<From,To>' being compiled
1> with
1> [
1> From=test<A>,
1> To=A
1> ]
1> z:\dev\projekte\_test\main.cpp(17) : see reference to class
template instantiation 'boost::is_convertible<From,To>' being compiled
1> with
1> [
1> From=test<A>,
1> To=A
1> ]
1>z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(295): error C2065: 'value'
: undeclared identifier
1>z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(295): error C2955:
'boost::type_traits::ice_or' : use of class template requires template
argument list
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\detail\ice_or.hpp(21) : see declaration of
'boost::type_traits::ice_or'
1>z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(295): error C2057: expected
constant expression
1>z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\is_convertible.hpp(418): error C2975: 'val' :
invalid template argument for 'boost::integral_constant', expected
compile-time constant expression
1> z:\dev\projekte\boost\boost-
dev\boost\boost\type_traits\integral_constant.hpp(18) : see declaration of
'val'
}}}
Switching to std::tr1::is_convertible makes the code compile fine.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4530> 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:04 UTC