From ae1c44789f3f1182c894d5fcfe6cfcf3303f2921 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 1 Jul 2004 23:35:13 +0000 Subject: [PATCH] Fixed an error that turned up in VC++. I think the problem was that VC++ didn't allow friend functions to be defined in the body of declarations in .h files. --- Cantera/src/Group.cpp | 12 ++++++++++-- Cantera/src/Group.h | 13 +++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Cantera/src/Group.cpp b/Cantera/src/Group.cpp index 34b43c64d..41b389dac 100755 --- a/Cantera/src/Group.cpp +++ b/Cantera/src/Group.cpp @@ -21,8 +21,6 @@ #include #include "Group.h" -#include "Group.h" - namespace Cantera { /** @@ -73,4 +71,14 @@ namespace Cantera { return s; } + std::ostream& + operator<<(std::ostream& s, const Cantera::Group& g) { + if (g.valid()) { + s << g.m_comp; + } else { + s << ""; + } + return s; + } + } diff --git a/Cantera/src/Group.h b/Cantera/src/Group.h index b62aa4cf4..3f8b6ecde 100755 --- a/Cantera/src/Group.h +++ b/Cantera/src/Group.h @@ -13,7 +13,9 @@ #define CT_RXNPATH_GROUP #include "ct_defs.h" +#include "ctvector.h" +using namespace std; namespace Cantera { /** @@ -117,16 +119,11 @@ namespace Cantera { ostream& fmt(ostream& s, const vector& esymbols) const; - friend ostream& operator<<(ostream& s, const Group& g) { - if (g.valid()) - s << g.m_comp; - else - s << ""; - return s; - } + friend std::ostream& operator<<(std::ostream& s, + const Group& g); private: - vector_int m_comp; + ctvector_int m_comp; int m_sign; };