Add a conversion constructor so a bitunion can be initialized to a value.

Previously, the bitunion would need to be declared and then assigned to separately.

--HG--
extra : convert_revision : d229bd83bc7baeca2259d4e7b080f359915015f3
This commit is contained in:
Gabe Black 2007-07-17 13:23:42 -07:00
parent 873b762d4b
commit 13ccac1a3c

View file

@ -193,6 +193,13 @@ namespace BitfieldBackend
class BitUnionOperators : public Base
{
public:
BitUnionOperators(Type & _data)
{
Base::__data = _data;
}
BitUnionOperators() {}
operator Type () const
{
return Base::__data;