summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/bitunion.hh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index b2a2ba806..49a956eec 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -419,10 +419,9 @@ namespace std
namespace BitfieldBackend
{
-namespace
-{
+
template<typename T>
- std::ostream &
+ static inline std::ostream &
bitfieldBackendPrinter(std::ostream &os, const T &t)
{
os << t;
@@ -433,7 +432,7 @@ namespace
//these specializations attempt to ensure that they get cast to integers
//of the appropriate type before printing.
template <>
- std::ostream &
+ inline std::ostream &
bitfieldBackendPrinter(std::ostream &os, const char &t)
{
os << (const int)t;
@@ -441,14 +440,13 @@ namespace
}
template <>
- std::ostream &
+ inline std::ostream &
bitfieldBackendPrinter(std::ostream &os, const unsigned char &t)
{
os << (const unsigned int)t;
return os;
}
}
-}
//A default << operator which casts a bitunion to its underlying type and
//passes it to BitfieldBackend::bitfieldBackendPrinter.