Suggested Messaging: Messaging seems redundant in indicating that function has 
been redifined twice. One of the messages should be removed. More to the point, 
I think the messaging may be erroneous - code fragment follows.


g++-4 Diagnostic Messaging

In file included from partition.cpp:66:
irange.h: In function 'std::ostream& operator<<(std::ostream&, 
ciRange_2::sRange_2&)':
irange.h:102: error: redefinition of 'std::ostream& operator<<(std::ostream&, 
ciRange_2::sRange_2&)'
irange.h:102: error: 'std::ostream& operator<<(std::ostream&, 
ciRange_2::sRange_2&)' previously defined here


---- Code Fragment ----
class ciRange_2 : public iRange_List {           // <low, high>
public:
    struct sRange_2 { double RLo;                // Low  range value
                      double RHi; };             // High range value

    friend istream& operator>>(istream& stream, ciRange_2::sRange_2& Range);
    friend ostream& operator<<(ostream& stream, ciRange_2::sRange_2& Range);
}; // class ciRange_2

istream& operator>>(istream& stream, ciRange_2::sRange_2& Range);

ostream& operator<<(ostream& stream, ciRange_2::sRange_2& Range) {
   stream << setw(9) << Range.RLo << " " << setw(9) << Range.RHi;
}

Reply via email to