Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-03-16 14:37:49


MS VC++6 is not a C++ compiler.

----- Original Message -----
From: Ronen Halsadi <RonenH_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, March 16, 2000 11:01 AM
Subject: [boost] Re: Questions

Ok MS VC++6 does not support template function ( =
BOOST_NO_MEMBER_TEMPLATES).
So does it mean that the smart pointer library is useless in MS VC++6 or
there's any way to make it work ??

> -----Original Message-----
> From: Valentin Bonnard [SMTP:Bonnard.V_at_[hidden]]
> Sent: ä 16 îøõ 2000 17:22
> To: boost_at_[hidden]
> Subject: [boost] Re: Questions
>
> ronenh_at_[hidden] wrote:
>
> > How can I pass APtr object to method that get ConstAPtr.
>
> Just do it.
>
> > How can I use Polymorphism with smart pointer.
>
> It should work.
>
> > class A {
> > :
> > virtual void DoIt();
> > :
> > };
> > typedef shared_ptr<A> APtr;
> > typedef shaerd_ptr<const A> ConstAPtr;
> >
> > class Drive : public A{
> > :
> > virtual void DoIt();
> > :
> > };
> > typedef shared_ptr<Drive> DrivePtr;
>
> > void main()
> ^^^^
> Hum hum
>
> > Drive d;
>
> > DrivePtr pD(&d);
> ^^
> Hum hum
>
> The following should compile:
>
> $ cat smart-ptr-const.cc
> #include "smart_ptr.h"
>
> using namespace boost;
>
> typedef shared_ptr<A> APtr;
> typedef shared_ptr<const A> ConstAPtr;
>
> void func (ConstAPtr) {}
>
> int main ()
> {
> APtr p;
> func (p);
> }
>
> (I get an ICE, but should not.)
>
> Anyway, the conversions won't work if your compiler
> doesn't support template member function.
>
> --
>
> Valentin Bonnard
>
> ------------------------------------------------------------------------
> You have a voice mail message waiting for you at iHello.com:
> http://click.egroups.com/1/2377/1/_/9351/_/953220118/
>
> -- Check out your group's private Chat room
> -- http://www.egroups.com/ChatPage?listName=boost&m=1
>

------------------------------------------------------------------------
*** Got Questions? Get Answers. Got Answers? Get Paid. ***
Sign up at Infomarco.com and you can win $30,000 cash or a trip to China.
http://click.egroups.com/1/1251/1/_/9351/_/953229845/

-- Talk to your group with your own voice!
-- http://www.egroups.com/VoiceChatPage?listName=boost&m=1


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk