Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Eigen and UPP? (STL question?)
Re: Eigen and UPP? (STL question?) [message #32373 is a reply to message #32360] Fri, 13 May 2011 15:10 Go to previous messageGo to previous message
mr_ped is currently offline  mr_ped
Messages: 826
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Eigen has it's own Matrix type, which has it's own "to std::string" conversion routine.
Which makes std::cout << Eigen::MatrixXd to compile without problem.

Cout() is not std::ostream (or what's the base output stream in STL/C++, I have no idea), it's Upp::output stream (not sure about exact class name either).

So the compiler can't find the conversion function from Eigen::MatrixXd to Upp::String (which is most common input format for "<<" for Upp::ostream.

And dolik did just supply you with one conversion function for such situation.

NAMESPACE_UPP is macro to open Upp:: namespace, so you are with the next code defining
Upp::String Upp::AsString(const Eigen::MatrixXd& m)

function.
Then later during compiling "Cout() << m" that new method is perfect fit for silent auto conversion.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Appearance errors in HelloWorld app build with MSVC++ 10
Next Topic: How to print staticlabel text at an angle?
Goto Forum:
  


Current Time: Sun Aug 24 14:09:01 CEST 2025

Total time taken to generate the page: 0.04776 seconds