inline fn. COmpile error on gcc

This commit is contained in:
Hieu Hoang 2016-04-26 17:29:24 -04:00
parent a6634789fd
commit 7d780593bb
2 changed files with 9 additions and 2 deletions

View File

@ -33,7 +33,7 @@ protected:
};
///////////////////////////////////////////////////////
std::ostream& operator<<(std::ostream &out, const SubPhrase<Moses2::Word> &obj)
inline std::ostream& operator<<(std::ostream &out, const SubPhrase<Moses2::Word> &obj)
{
if (obj.GetSize()) {
out << obj[0];

View File

@ -53,12 +53,19 @@ protected:
};
///////////////////////////////////////////////////////////////////////
inline std::ostream& operator<<(std::ostream &out, const TargetPhrase<Moses2::Word> &obj)
{
out << (const Phrase<Moses2::Word> &) obj << " SCORES:" << obj.GetScores();
return out;
}
/*
template<typename WORD>
inline std::ostream& operator<<(std::ostream &out, const TargetPhrase<WORD> &obj)
std::ostream& operator<<(std::ostream &out, const TargetPhrase<WORD> &obj)
{
out << (const Phrase<WORD> &) obj << " SCORES:" << obj.GetScores();
return out;
}
*/
///////////////////////////////////////////////////////////////////////
template<typename WORD>