Why is the member "content" private in any? I tried to make it public but I actually couldn't find it in the .h file.
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.
Thank you for the explanation.So it's not going to be safe as in "type safe" but it may well be perfectly safe.I don't understand this.
As I described which is not quite how it works wouldn't be type safe as you could put something without a method in then call that method but it would be safe as like everything else in coding in it wouldn't break unless you did something wrong.
polly<allMethodsAble> p1;
This would be useful, but if it won't do this then it's any_stream.
Contact the maintainer to find out if he wants to put the already implemented stream support or <...able> into any.