The credibility goes down the toiler the moment you mention STL iterator
and
It's _your_ credibility that suffers when you make such general
statements.
It does not suffer at all, except for the fact that took pains to lead you
by hand to explain what the trouble was.
Apparently not. Perhaps you're not making yourself clear.
I thought it is very clear that there is no substitute for knowing what you
are doing: you can take fully legal c++ code, put it into context and have
it fail miserably.
Yes. I am well aware of what can go wrong if you code this kind of thing
naively.
Eg. using Standard Library "like it should be used" in context where it
clearly fails. QED.
Irrelevant here. I'm not relying on a short string optimisation.
Good, then you example earlier is obviously not related to the ongoing
argument. I mean, if you DO return std::string across DLL boundary, it is
lotto if it works or not. Isn't it? If you encapsulate it inside object
which invokes the destructor where the constructor was invoked there is no
problem, precisely example of what you might do when you know what the
problem is. Using Standard Library is tricky business in the real world, it
is not as idealistic as it is in textbooks: you just use it happily and
things "just work", in real world that is not the case is it?
No gambling here. I specify the ownership model. I write and compile the
DLL to enforce that model. I write and compile the client code.
Aha, you , quote, "specify (the) ownership model". Now you are stepping
outside of the small box that the Standard defines and are virtually
agreeing that it doesn't guarantee that the code is "reusable", you have to
engineer the code to fit the circumastances, isn't that so? Your actions
speak volumes about your attitude in this: it's the same I have! You are
arguing because you find me annoying little pest, aren't you?
Ditto, I rest my case.