Skip to content

forceCoeffs << operator defined in incorrect namespace

Compilation error reported in https://github.com/mathLab/ITHACA-FV/issues/505#issuecomment-1238279763

It looks to me that forceCoeffs.H should have this instead:

} // End namespace functionObjects

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Ostream& operator<<(Ostream& os, const functionObjects::forceCoeffs::coeffDesc& coeff)
{
    os  << coeff.desc_.c_str() << ": " << coeff.name_;

    return os;
}

} // End namespace Foam

Otherwise it will define Foam::functionObjects::operator<< instead of Foam::operator<<

@andy