C++ Logo


Advanced search

Subject: Making std::bitset constexpr
From: Henrik Sjöström (akilles77_at_[hidden])
Date: 2019-06-20 12:27:28

Is there a reason for most members of std::bitset not to be constexpr? For
example bitset.none(), all(), any(),count().

Currently this simple program fails to compile.


int main()


constexpr std::bitset<20> bits{};

constexpr auto is_none = bits.none(); //Fails as none() isn’t constexpr


Thanks in advance,

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups