Calling constexpr function for bitset template parameter
问题 I'm trying to type alias the std::bitset class where the template parameter N is calculated using a constexpr function. However, this approach seems to be running into a wall. The code currently looks like this: static constexpr std::size_t ComponentCount() noexcept { return 3U; } static constexpr std::size_t TagCount() noexcept { return 5U; } using Bitset = std::bitset<ComponentCount() + TagCount()>; And the error I'm receiving is as follows: 1>error C2975: '_Bits': invalid template argument