[bitset.syn]

# 22 General utilities library [[utilities]](./#utilities)

## 22.9 Bitsets [[bitset]](bitset#syn)

### 22.9.1 Header <bitset> synopsis [bitset.syn]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L10360)

The header <bitset> defines a class template
and several related functions for representing
and manipulating fixed-size sequences of bits[.](#1.sentence-1)

#include <string> // see [[string.syn]](string.syn "27.4.2 Header <string> synopsis")#include <iosfwd> // for istream ([[istream.syn]](istream.syn "31.7.1 Header <istream> synopsis")), ostream ([[ostream.syn]](ostream.syn "31.7.2 Header <ostream> synopsis")), see [[iosfwd.syn]](iosfwd.syn "31.3.1 Header <iosfwd> synopsis")namespace std {template<size_t N> class bitset; // [[bitset.operators]](bitset.operators "22.9.4 bitset operators"), bitset operatorstemplate<size_t N>constexpr bitset<N> operator&(const bitset<N>&, const bitset<N>&) noexcept; template<size_t N>constexpr bitset<N> operator|(const bitset<N>&, const bitset<N>&) noexcept; template<size_t N>constexpr bitset<N> operator^(const bitset<N>&, const bitset<N>&) noexcept; template<class charT, class traits, size_t N> basic_istream<charT, traits>&operator>>(basic_istream<charT, traits>& is, bitset<N>& x); template<class charT, class traits, size_t N> basic_ostream<charT, traits>&operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);}
