// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UTIL_YET_ANOTHER_BIT_VECTOR_H_ #define UTIL_YET_ANOTHER_BIT_VECTOR_H_ #include <stdint.h> #include <limits> namespace openscreen { // This is yet another bit vector implementation. Unlike the ones found in the // standard library, this one provides useful functionality (find first bit set, // count number of bits set, shift right) as well as efficiency. // // Storage details: The vector must be explicitly sized (when constructed or // Resize()'ed). There is no dynamic resizing via a push_back()-like operation. // Storage is determined based on the size specified by the user: either one // 64-bit integer stored within the class structure (for all sizes <= 64), or a // heap-allocated array of multiple 64-bit integers. class YetAnotherBitVector { … }; } // namespace openscreen #endif // UTIL_YET_ANOTHER_BIT_VECTOR_H_