Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] How to serialize third party libraryfunction
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-12-07 16:01:28


AMDG

elizabeta petreska wrote:
> OK, I know installed the latest version of boost, which uses
> has_new_operator type trait.
>
> But , know I am getting compiler errors , for this minimal test program :
>
> #include <boost/type_traits/has_new_operator.hpp>
> class A {
> public:
> void* operator new(std::size_t);
> void* operator new[] (size_t);
> void* operator new(std::size_t, void*);
> };
>
> int main()
> {
> boost::has_new_operator<A>();
> }
>
> The compiler errors are :
>
> Error 1:
> error C2975: 'b1' : invalid template argument for
> 'boost::type_traits::ice_or', expected compile-time constant expression
> \libs\boost\inc\boost-1_41\boost\type_traits\has_new_operator.hpp 100
>

What compile are you using?
The code compiles fine for me with Visual C++ 8.0 and 9.0.

In Christ,
Steven Watanabe


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