Why aren't std::algorithms constexpr and which could be?
Why aren't any std::algorithm methods constexpr ? If I understand the new C++14 rules correctly, many of these methods could be constexpr . For example, why can't std::find be constexpr ? static constexpr std::array<char, 4> DnaBases {'A', 'C', 'G', 'T'}; constexpr bool is_dna(char b) { return std::find(std::cbegin(DnaBases), std::cend(DnaBases), b) != std::cend(DnaBases); // why not? } Which other std::algorithm s could be constexpr ? ForEveR It could be constexpr , but cannot be evaluated as a constant expression, since in this case, for example for compile-time find it is required that: