27 using namespace dccl::logger;
29 dccl::Bitset dccl::Bitset::relinquish_bits(size_type num_bits,
bool final_child)
31 if (final_child || this->size() < num_bits)
33 size_type num_parent_bits = (final_child) ? num_bits : num_bits - this->size();
36 Bitset parent_bits = parent_->relinquish_bits(num_parent_bits,
false);
44 for (size_type i = 0; i < num_bits; ++i)
47 throw(
dccl::Exception(
"Cannot relinquish_bits - no more bits to give up! Check "
48 "that all field codecs are always producing (encode) and "
49 "consuming (decode) the exact same number of bits."));
51 out.push_back(this->front());