以下に示すように、boost::dynamic_bitset を使用しようとしています。
#include <boost/dynamic_bitset.hpp>
class Bitmap
{
public:
Bitmap(std::size_t size = _size);
void setBit(int pos);
void clearBit(int pos);
bool get(int pos);
void resize(int size);
private:
boost::dynamic_bitset<> _bitset(8);
static const std::size_t _size;
};
dynamic_bitset を宣言しているときに、次のエラーが発生します。
test1.cpp:14: error: expected identifier before numeric constant
test1.cpp:14: error: expected ‘,’ or ‘...’ before numeric constant
Boost のドキュメントでは、ここに例が示されています。これは完全に正常にコンパイルされます。誰かがここで問題を指摘できますか?
私のコンパイラは g++ バージョン 4.4.5 です。