On Sat, Sep 21, 2013 at 05:23:18PM -0400, Howard Hinnant wrote:
> Can you show a conforming example that demonstrates this problem?  My 
> thinking has been that there is no way to use these functions in a conforming 
> manner wtih including <{i,o}stream>.

This is what I had in mind:

TU1:
========================================================================
#include <iosfwd>
#include <string>

void f(std::ostream &os, const std::string &s) {
  os << s;
}
========================================================================

TU2:
========================================================================
#include <iostream>
#include <string>

using namespace std;

void f(ostream &os, const string &s);

int main() {
  f(cout, "hello world");
}
========================================================================

I believe this is conforming, but I may be mistaken.

Thanks,
-- 
Peter
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to