From 1e49a0aa1d8570950d967573dae0530e3249d6d3 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 5 Jul 2019 09:58:10 +0800 Subject: [PATCH] [Mod] updated autocxxpy: generate caster for only classes and enums --- vnpy/api/oes/vnoes/include/autocxxpy/casters.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vnpy/api/oes/vnoes/include/autocxxpy/casters.hpp b/vnpy/api/oes/vnoes/include/autocxxpy/casters.hpp index da3b5329..8ab6d79f 100644 --- a/vnpy/api/oes/vnoes/include/autocxxpy/casters.hpp +++ b/vnpy/api/oes/vnoes/include/autocxxpy/casters.hpp @@ -55,13 +55,14 @@ namespace autocxxpy template static auto try_generate(scope_type &m, const char *name) { - if constexpr (is_defined_v) { - if constexpr (!std::is_array_v) { - if constexpr (std::is_default_constructible_v) { - generate_nocheck(m, name); + if constexpr (std::is_class_v || std::is_enum_v) { + if constexpr (is_defined_v) { + if constexpr (!std::is_array_v) { + if constexpr (std::is_default_constructible_v) { + generate_nocheck(m, name); + } } } - } } private: