Boost logo

Boost Users :

From: chun ping wang (cablepuff_at_[hidden])
Date: 2007-10-15 21:42:55


error:
./cs512/c++/primeMain.cpp(65) : error C2770: invalid explicit template
argument(s) for
'boost::enable_if<boost::mpl::or_<boost::is_integral<T>,algocpw::is_operators<T>>,void>::type
test_operators(void)'
        ./cs512/c++/primeMain.cpp(58) : see declaration of 'test_operators'
./cs512/c++/primeMain.cpp(66) : error C2770: invalid explicit template
argument(s) for
'boost::enable_if<boost::mpl::or_<boost::is_integral<T>,algocpw::is_operators<T>>,void>::type
test_operators(void)'
        ./cs512/c++/primeMain.cpp(58) : see declaration of 'test_operators'
If that is the problem. Is their a way to fix is_operators to say that
1.) boost::operators<T> is at least one of the base class of MyInt.
or
2.) A Way to have my class pass the "is_integral<T>" test. A user defined
data type that acts like an integer and that passes the "is_integral" test
.

On 10/15/07, David Abrahams <dave_at_[hidden]> wrote:
>
> The most obvious problem you have is that instantiating
> is_operator<BigInteger> is likely to cause an overloading ambiguity
> because BigInteger is derived from two different operator<T,U>
> specializations.
>
> --
> Dave Abrahams
> Boost Consulting
> http://www.boost-consulting.com
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>






Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net