[#bitset_detail-IntBitSet]
= xref:bitset_detail.adoc[bitset&lowbar;detail]::IntBitSet
:relfileprefix: ../
:mrdocs:

A bitset implementation backed by a single integer of type I&period;

== Synopsis

Declared in `&lt;util&sol;bitset&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename I&gt;
class IntBitSet;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bitset_detail/IntBitSet/2constructor-0c.adoc[`IntBitSet`]         [.small]#[constructor]#
| Constructors
| xref:bitset_detail/IntBitSet/operator_assign-02.adoc[`operator&equals;`] 
| Assignment operators
| xref:bitset_detail/IntBitSet/Any.adoc[`Any`] 
| Check if any bits are 1&period;
| xref:bitset_detail/IntBitSet/Count.adoc[`Count`] 
| Compute the number of 1 bits in the bitset&period;
| xref:bitset_detail/IntBitSet/First.adoc[`First`] 
| Find the first element (requires Any())&period;
| xref:bitset_detail/IntBitSet/IsSubsetOf.adoc[`IsSubsetOf`] 
| Check if bitset a is a subset of bitset b (&equals; every 1 bit in a is also in b)&period;
| xref:bitset_detail/IntBitSet/IsSupersetOf.adoc[`IsSupersetOf`] 
| Check if bitset a is a superset of bitset b (&equals; every 1 bit in b is also in a)&period;
| xref:bitset_detail/IntBitSet/Last.adoc[`Last`] 
| Find the last element (requires Any())&period;
| xref:bitset_detail/IntBitSet/None.adoc[`None`] 
| Check if all bits are 0&period;
| xref:bitset_detail/IntBitSet/Overlaps.adoc[`Overlaps`] 
| Check if the intersection between two sets is non&hyphen;empty&period;
| xref:bitset_detail/IntBitSet/Reset.adoc[`Reset`] 
| Set a bit to 0&period;
| xref:bitset_detail/IntBitSet/Set-0a.adoc[`Set`] 
| `Set` overloads
| xref:bitset_detail/IntBitSet/begin.adoc[`begin`] 
| Return an object that iterates over all 1 bits (&plus;&plus; and &ast; only allowed when !&equals; end())&period;
| xref:bitset_detail/IntBitSet/end.adoc[`end`] 
| Return a dummy object to compare Iterators with&period;
| xref:bitset_detail/IntBitSet/operator_and_eq.adoc[`operator&amp;&equals;`] 
| Set this object&apos;s bits to be the binary AND between respective bits from this and a&period;
| xref:bitset_detail/IntBitSet/operator_minus_eq.adoc[`operator&hyphen;&equals;`] 
| Set this object&apos;s bits to be the binary AND NOT between respective bits from this and a&period;
| xref:bitset_detail/IntBitSet/operator_subs.adoc[`operator&lsqb;&rsqb;`] 
| Retrieve a bit at the given position&period;
| xref:bitset_detail/IntBitSet/operator_xor_eq.adoc[`operator&circ;&equals;`] 
| Set this object&apos;s bits to be the binary XOR between respective bits from this and a&period;
| xref:bitset_detail/IntBitSet/operator_or_eq.adoc[`operator&verbar;&equals;`] 
| Set this object&apos;s bits to be the binary OR between respective bits from this and a&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bitset_detail/IntBitSet/Fill.adoc[`Fill`] 
| Construct a bitset with bits 0&period;&period;count&hyphen;1 (inclusive) set to 1&period;
| xref:bitset_detail/IntBitSet/Singleton.adoc[`Singleton`] 
| Construct a bitset with the singleton i&period;
| xref:bitset_detail/IntBitSet/Size.adoc[`Size`] 
| Return the number of bits that this object holds&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:bitset_detail/swap-0d.adoc[bitset&lowbar;detail::swap]`
| Swap two bitsets&period;
| `xref:bitset_detail/operator_eq-0a.adoc[bitset&lowbar;detail::operator&equals;&equals;]`
| Check if bitset a and bitset b are identical&period;
| `xref:bitset_detail/operator_xor-01.adoc[bitset&lowbar;detail::operator&circ;]`
| Return an object with the binary XOR between respective bits from a and b&period;
| `xref:bitset_detail/operator_minus-0f.adoc[bitset&lowbar;detail::operator&hyphen;]`
| Return an object with the binary AND NOT between respective bits from a and b&period;
| `xref:bitset_detail/operator_bitor-01.adoc[bitset&lowbar;detail::operator&verbar;]`
| Return an object with the binary OR between respective bits from a and b&period;
| `xref:bitset_detail/operator_bitand-00.adoc[bitset&lowbar;detail::operator&amp;]`
| Return an object with the binary AND between respective bits from a and b&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
