Common: Move BitSet into the Common namespace

This should be under the common namespace, considering where it's living
This commit is contained in:
Lioncash 2018-04-22 23:43:05 -04:00
parent 1f130c09e4
commit 2ce0f42c14
1 changed files with 6 additions and 7 deletions

View File

@ -83,8 +83,7 @@ inline int LeastSignificantSetBit(u64 val)
} }
#endif #endif
// namespace avoids conflict with OS X Carbon; don't use BitSet<T> directly namespace Common
namespace BS
{ {
// Similar to std::bitset, this is a class which encapsulates a bitset, i.e. // Similar to std::bitset, this is a class which encapsulates a bitset, i.e.
// using the set bits of an integer to represent a set of integers. Like that // using the set bits of an integer to represent a set of integers. Like that
@ -207,9 +206,9 @@ public:
constexpr Iterator end() const { return Iterator(m_val, -1); } constexpr Iterator end() const { return Iterator(m_val, -1); }
IntTy m_val; IntTy m_val;
}; };
} } // namespace Common
typedef BS::BitSet<u8> BitSet8; using BitSet8 = Common::BitSet<u8>;
typedef BS::BitSet<u16> BitSet16; using BitSet16 = Common::BitSet<u16>;
typedef BS::BitSet<u32> BitSet32; using BitSet32 = Common::BitSet<u32>;
typedef BS::BitSet<u64> BitSet64; using BitSet64 = Common::BitSet<u64>;