SWIG导出复杂C++模板代码

从SWIG 4.2.0开始, SWIG开始支持导出如下复杂模板代码.

SWIG模板导出

比如支持类似swig-4.2.1/Examples/test-suite/template_template_template_parameters.i含有大量复杂模板的代码:

%module template_template_template_parameters

%inline %{
   
   
// Github issue #624
class CustomAttrs {
   
   
public:
  enum dattr1d {
   
   pos, vel, someCustomCaseVar, d1dLast};
};

template <class TT> 
class A {
   
   
public:
  TT attributes;
  virtual ~A() {
   
   }
};

template <template<class> class A, class T>
class B : public A<T> {
   
   
public:
  virtual void BMethod(T t_parm, A<T> at_parm) {
   
   }
};

template <template<template<class> class, class> class Op, template<class> class X, class Y>
class 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值