welder
0.1.0
Bindings for annotated C++ types, from C++26 reflection
Toggle main menu visibility
Loading...
Searching...
No Matches
module.hpp
Go to the documentation of this file.
1
#pragma once
14
#include <
welder/rods/python/pybind11/rod.hpp
>
15
#include <
welder/module.hpp
>
// the backend-agnostic WELDER_MODULE dispatch
16
31
#define WELDER_DETAIL_MODULE_ENTRY_pybind11(ns, ...) \
32
static void welder_glue_##ns##_pybind11(::pybind11::module_&); \
33
PYBIND11_MODULE(ns, welder_module_var_) { \
34
using welder_weld_ = ::welder::detail::module_welder_t< \
35
::welder::welder<::welder::rods::pybind11::rod<>> \
36
__VA_OPT__(, ) __VA_ARGS__>; \
37
static_assert( \
38
::std::is_same_v<typename welder_weld_::module_type, \
39
::pybind11::module_>, \
40
"WELDER_MODULE(ns, pybind11, W): W must be a welder::welder over a " \
41
"rod whose module handle is pybind11::module_"); \
42
welder_weld_::weld_module<^^ns>( \
43
welder_module_var_, welder_weld_::noop, \
44
[](::pybind11::module_& welder_glue_m_) { \
45
welder_glue_##ns##_pybind11(welder_glue_m_); \
46
}); \
47
} \
48
static void welder_glue_##ns##_pybind11(::pybind11::module_& module)
module.hpp
Rod-agnostic module entry point — the WELDER_MODULE macro.
rod.hpp
welder pybind11 rod (header-only).
src
welder
rods
python
pybind11
module.hpp
Generated by
1.17.0