mask.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mask.cc
Go to the documentation of this file.
1 #include "osl/misc/mask.h"
2 #include <boost/static_assert.hpp>
3 #include <iostream>
4 #include <iomanip>
5
6 namespace osl
7 {
8 // mask_t が必要なビットを表現できることの確認
9 #if OSL_WORDSIZE == 64
10 BOOST_STATIC_ASSERT(sizeof(mask_t) == 8);
11 #elif OSL_WORDSIZE == 32
12 BOOST_STATIC_ASSERT(sizeof(mask_t) == 4);
13 #endif
14 }
15
16 std::ostream& osl::misc::operator<<(std::ostream& os,const osl::mask_t& mask)
17 {
18 return os << "mask(0x" << std::setbase(16) <<
19 mask.value() << std::setbase(10) << ')';
20 }
21 // ;;; Local Variables:
22 // ;;; mode:c++
23 // ;;; c-basic-offset:2
24 // ;;; End:
25