Boost logo

Boost Users :

Subject: Re: [Boost-users] boost any questions and praise
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2010-02-03 14:27:15


2010/2/3 Alan Tennant <alan2here_at_[hidden]>

> I get an error that points me to this page
> http://stlab.adobe.com/wiki/index.php/Troubleshooting
> Probably because I'm using VC++9 not 8.
>
> Just to clarify I meant this.
>
> std::string s1 = "1234";
> std::cout<<s1.length(); // couts 4
>
> adobe::polly p1;
> p1 = s1;
> std::cout<<p1.length(); // not necessarily this exact syntax. couts 4
>
> std::string s2;
> s2 = polly_cast<std::string>(p1);
> std::cout<<s2;
>

The syntax is more like this:

poly<ostreamable> p;
p = 42;
cout << p; // writes "42"
p = "hello";
cout << p; // writes "hello";
p = vector<int>(); // does not compile, because vector<int> is not
ostreamable.

Note that you should implement ostreamable.

> So it's not going to be safe as in "type safe" but it may well be perfectly
> safe.

I don't understand this.

Roman Perepelitsa.



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