Problem with ostringstream and Daixtrose

"John Fletcher" <[email protected]> Wed, 11 Jan 2006 09:25:32 -0000
Newsgroups gmane.comp.lib.daixtrose.help
Message-ID <43C4CF0C.11054.F52D4@localhost>
Marcus

Here is some code which has a problem compiling because
Defaultops seems to be overloading operator << in a way which
conflicts with what is done by std::ostringstream.

John Fletcher

// Cut down to a minimum to show the problem
between

// Daixtrose::DefaultOps and std::ostringstream
operator <<

// This file fails to compile with -DPROBLEM. (g++
3.3.3 32 bit and g++ 4.0.2 64 bit)

#include "daixtrose/Daixt.h"

#include <iostream>

#include <sstream>

int main()

{

std::ostringstream out;

#ifdef PROBLEM

using namespace Daixt::DefaultOps;

#endif

//std::cout << "Test of sstream problem " <<
std::endl;

out << "Test of sstream problem " << std::endl;

std::cout << out.str();

return 0;

}

--

Dr John P. Fletcher Tel: (44) 121 204 3389
(direct line)

Chemical Engineering and Applied Chemistry (CEAC),

School of Engineering and Applied Science (SEAS),

Aston University, Aston Triangle, BIRMINGHAM B4
7ET U.K.

CEAC Web site http://www.ceac.aston.ac.uk/

FAX: (44) 121 204 3679

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click