diff options
author | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
commit | f1c3f3044b73d890ffdfdd113b3b37ae2809d21b (patch) | |
tree | 959d71e897a8d01868c8dea8a8b225cbd1b5ce2c /src/mem/ruby/common/SubBlock.hh | |
parent | be10204729c107b41d5d7487323c732e9fa09df5 (diff) | |
download | gem5-f1c3f3044b73d890ffdfdd113b3b37ae2809d21b.tar.xz |
ruby: get "using namespace" out of headers
In addition to obvious changes, this required a slight change to the slicc
grammar to allow types with :: in them. Otherwise slicc barfs on std::string
which we need for the headers that slicc generates.
Diffstat (limited to 'src/mem/ruby/common/SubBlock.hh')
-rw-r--r-- | src/mem/ruby/common/SubBlock.hh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mem/ruby/common/SubBlock.hh b/src/mem/ruby/common/SubBlock.hh index ab286dd0e..571d45b57 100644 --- a/src/mem/ruby/common/SubBlock.hh +++ b/src/mem/ruby/common/SubBlock.hh @@ -29,6 +29,8 @@ #ifndef __MEM_RUBY_COMMON_SUBBLOCK_HH__ #define __MEM_RUBY_COMMON_SUBBLOCK_HH__ +#include <iostream> + #include "mem/gems_common/Vector.hh" #include "mem/ruby/common/Address.hh" #include "mem/ruby/common/DataBlock.hh" @@ -58,7 +60,7 @@ class SubBlock void mergeTo(DataBlock& data) const { internalMergeTo(data); } void mergeFrom(const DataBlock& data) { internalMergeFrom(data); } - void print(ostream& out) const; + void print(std::ostream& out) const; private: void internalMergeTo(DataBlock& data) const; @@ -69,11 +71,11 @@ class SubBlock Vector<uint8_t> m_data; }; -inline ostream& -operator<<(ostream& out, const SubBlock& obj) +inline std::ostream& +operator<<(std::ostream& out, const SubBlock& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } |