Answers for "c++ restrict template types"

C++
0

c++ restrict template types

#include <type_traits>

template<typename T>
class observable_list {
    static_assert(std::is_base_of<list, T>::value, "T must inherit from list");
    // code here..
};
Posted by: Guest on July-31-2021

Browse Popular Code Answers by Language