Skip to content

Commit 69bdef5

Browse files
committed
🎨 Allow type_bitset construction with generic type list
Problem: - `type_bitset` expects a `stdx::type_list` to be passed to the constructor; in fact any "type list" (like tuple) could work. Solution: - Genericize the `type_bitset` constructor.
1 parent 8a62026 commit 69bdef5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/stdx/bitset.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ template <typename... Ts> class type_bitset {
538538
constexpr explicit type_bitset(all_bits_t) : bs{all_bits} {}
539539
constexpr explicit type_bitset(std::uint64_t value) : bs{value} {}
540540

541-
template <typename... Us>
542-
constexpr explicit type_bitset(type_list<Us...>)
541+
template <template <typename...> typename L, typename... Us>
542+
constexpr explicit type_bitset(L<Us...>)
543543
: bs{place_bits, detail::index_of<Us, list_t>...} {
544544
static_assert((... and (detail::index_of<Us, list_t> < N)),
545545
"Type not found in bitset");

0 commit comments

Comments
 (0)