GuillaumeDua / CppShelf

Collection of powerfuls - C++ Single-Header Libraries Files
https://guillaumedua.github.io/CppShelf/
MIT License
9 stars 1 forks source link

[mp] equal #167

Open GuillaumeDua opened 9 months ago

GuillaumeDua commented 9 months ago
// equal
template <typename pack_1, typename pack_2>
struct equal : std::false_type{};
template <
    template <typename ...> typename pack_1,
    template <typename ...> typename pack_2,
    typename ... Ts
>
struct equal<pack_1<Ts...>, pack_2<Ts...>> : std::true_type{};
template <typename pack_1, typename pack_2>
constexpr auto equal_v = equal<pack_1, pack_2>::value;

Q: API: 2 pack vs. 1 pack + Ts...