mirror of
https://github.com/zoriya/nitro.git
synced 2026-10-13 00:05:23 +00:00
* feat: Move `Props` into Nitro Modules core via C++ template * Update Podfile.lock * Generate props in user code again * Use CachedProp constructor * include properly * Update IsFunctionProp.hpp * refactor * simplify
24 lines
466 B
C++
24 lines
466 B
C++
//
|
|
// IsFunctionProp.hpp
|
|
// NitroModules
|
|
//
|
|
// Created by Marc Rousavy on 21.06.24.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <type_traits>
|
|
|
|
namespace margelo::nitro {
|
|
|
|
template <typename T>
|
|
struct IsFunctionProp : std::false_type {};
|
|
|
|
template <typename TResult, typename... TArgs>
|
|
struct IsFunctionProp<std::function<TResult(TArgs...)>> : std::true_type {};
|
|
|
|
template <typename T>
|
|
struct IsFunctionProp<std::optional<T>> : IsFunctionProp<T> {};
|
|
|
|
} // namespace margelo::nitro
|