Use hex::derived_from for compatibility with macos
This commit is contained in:
parent
eb066b3539
commit
9ade281a92
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
#include <hex.hpp>
|
#include <hex.hpp>
|
||||||
|
|
||||||
#include <concepts>
|
#include <hex/helpers/utils.hpp>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -93,7 +94,7 @@ namespace hex {
|
|||||||
struct Views {
|
struct Views {
|
||||||
Views() = delete;
|
Views() = delete;
|
||||||
|
|
||||||
template<std::derived_from<View> T, typename ... Args>
|
template<hex::derived_from<View> T, typename ... Args>
|
||||||
static T* add(Args&& ... args) {
|
static T* add(Args&& ... args) {
|
||||||
return static_cast<T*>(add(new T(std::forward<Args>(args)...)));
|
return static_cast<T*>(add(new T(std::forward<Args>(args)...)));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user