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.