summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-06-12 00:54:32 -0400
committerGabe Black <gblack@eecs.umich.edu>2008-06-12 00:54:32 -0400
commit0368ccdedaa6b6fecb0f04924456953c92396188 (patch)
tree7fa5d2872d8ae3a94504ef1140b00a359c56c0dd
parent81936ae2ed0368f4687e74374bf32575376bf9df (diff)
downloadgem5-0368ccdedaa6b6fecb0f04924456953c92396188.tar.xz
BitUnion: Take out namespace declaration so bitunions can be declared inside classes.
-rw-r--r--src/base/bitunion.hh12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 7f7b06966..507fafecd 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
+ * Copyright (c) 2007-2008 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -242,11 +242,7 @@ namespace BitfieldBackend
//bitfields which are defined in the union, creating shared storage with no
//overhead.
#define __BitUnion(type, name) \
- namespace BitfieldUnderlyingClasses \
- { \
- class name; \
- } \
- class BitfieldUnderlyingClasses::name : \
+ class BitfieldUnderlyingClasses##name : \
public BitfieldBackend::BitfieldTypes<type> \
{ \
public: \
@@ -262,8 +258,8 @@ namespace BitfieldBackend
}; \
}; \
typedef BitfieldBackend::BitUnionOperators< \
- BitfieldUnderlyingClasses::name::__DataType, \
- BitfieldUnderlyingClasses::name> name;
+ BitfieldUnderlyingClasses##name::__DataType, \
+ BitfieldUnderlyingClasses##name> name;
//This sets up a bitfield which has other bitfields nested inside of it. The
//__data member functions like the "underlying storage" of the top level