>From: "Paul A. Bristow" <[EMAIL PROTECTED]> > This looks most useful - potentionally :-( > > Alas the two files, test and composite_stream_operators.hpp > > http://groups.yahoo.com/group/boost/files/composite_stream_operators/). > > won't compile on MSVC 7.0. > > test_composite_format.cpp > test_composite_format.cpp(43) : error C2679: binary '<<' : no operator found > which takes a right-hand operand of type 'composite_format<T>' (or there is no > acceptable conversion) > with > [ > T=char (&)[3] > ] > > and similarly for T=Map > > Is the cause/workaround obvious?
Looking at the error messages, and from what I've heard, it may be that it has problems with template friends (which is what the operator<< is). If that's the case, the workaround should be very easy - making it a free-function template. I did that, now, and it works. :) At least the vector_pair_test(). The array2D_test() uses a little fancy code, such as passing the type reference to array as a template parameter, and it seems MSVC 7.0 has some problems with this. Anyway, that was just to demonstrate usage with built-in types, as well, such as arrays. I'll look into it. There wasn't really any need for it to be a friend function, as it didn't access any private parts. It was just defined inside the class for convenience. I've also tested it on Intel C++ 7.0 in strict mode and g++ 3.2, so the code should be conformant, at least. Thanks for the report. I hadn't yet got around to do more portability testing, but intend to do that, including writing more tests for it. I've updated the version at Yahoo Groups with the above changes. Regards, Terje _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost