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.
This commit is contained in:
Harry Moffat 2004-07-01 23:35:13 +00:00
parent f2c6297f24
commit ae1c44789f
2 changed files with 15 additions and 10 deletions

View file

@ -21,8 +21,6 @@
#include <algorithm>
#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 << "<none>";
}
return s;
}
}

View file

@ -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<string>& esymbols) const;
friend ostream& operator<<(ostream& s, const Group& g) {
if (g.valid())
s << g.m_comp;
else
s << "<none>";
return s;
}
friend std::ostream& operator<<(std::ostream& s,
const Group& g);
private:
vector_int m_comp;
ctvector_int m_comp;
int m_sign;
};