F
felixnielsen
I would wery much like this to work:
@code start
#include <iostream>
#include <bitset>
const unsigned short size = 2; // 2^<unsigned int> //
union V {
char c[(size*size*size)/8];
std::bitset<size*size*size> b;
} v;
@code end
The compiler wont accept it and i cant accept that ;-)
A far as im concersed a bitset is just a number of bits and it shouldnt
be a problem, however it is and im in great need of a solution.
compiler error: "member std::bitset<8u> V::b' with constuctor not
allowed in union"
@code start
#include <iostream>
#include <bitset>
const unsigned short size = 2; // 2^<unsigned int> //
union V {
char c[(size*size*size)/8];
std::bitset<size*size*size> b;
} v;
@code end
The compiler wont accept it and i cant accept that ;-)
A far as im concersed a bitset is just a number of bits and it shouldnt
be a problem, however it is and im in great need of a solution.
compiler error: "member std::bitset<8u> V::b' with constuctor not
allowed in union"