Skip to content

Commit

Permalink
Clean up stream operators: warnings, template vs. std::ostream
Browse files Browse the repository at this point in the history
  • Loading branch information
wrwilliams committed Oct 19, 2016
1 parent 0cddced commit c0347f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions symtabAPI/h/StringTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ namespace Dyninst {
> StringTable;

typedef boost::shared_ptr<StringTable> StringTablePtr;
template <typename os>
os& operator<<(os& s, StringTableEntry e)

inline std::ostream& operator<<(std::ostream& s, StringTableEntry e)
{
s << e.str;
return s;
}

template <typename os>
os& operator<<(os& stream, const StringTable& tbl)
inline std::ostream& operator<<(std::ostream& stream, const StringTable& tbl)
{
for(int i = 0; i < tbl.size(); ++i)
for(size_t i = 0; i < tbl.size(); ++i)
{
stream << tbl[i] << " @ " << i << std::endl;
}
Expand Down

0 comments on commit c0347f3

Please sign in to comment.