Fix template_empty_inherit testcase

- To be standards compliant
- Wrap operator() for all target languages
This commit is contained in:
William S Fulton 2017-08-14 07:46:56 +01:00
commit b2660e7100

View file

@ -1,5 +1,7 @@
%module template_empty_inherit
%rename(FunctorOperator) operator();
%inline %{
template<class Arg, typename Result> struct Functor {
virtual Result operator()(Arg x) const = 0;
@ -13,6 +15,7 @@ template<class Arg, typename Result> struct Functor {
%inline %{
#include <algorithm>
#include <iterator>
struct SquareFunctor : Functor<int, int> {
int operator()(int v) const { return v*v; }
};