Hi Martin -
On Jan 20, 2009, at 10:53 AM, Martin B. wrote:
I am probably going to need some templates in C++ blocks in the near
future, so I had a look at the code in gnuradio-core, where the
templates are processed before the compiler gets to see the code (all
the *X.cc.t files). If I read correctly, there was some discussion a
while ago to change this to C++ templates.
Yes, see <
and follow-up threads. Maybe Eric or Johnathan can chime in on
any transition plans or thoughts?
Question: could this now be done with C++ templates, or is there a
(SWIGgy) reason to use the custom template system?
I’ve done this in my personal block making space; it works cleanly and
well in those cases I’ve tried. That said, I’m sure there are cases
where using GR’s template method makes more sense. Further, using C++
templates can result in messy and/or non-obvious programming … I
don’t have a good examples, but I’m confident that these are the cases
since they’re part of the “power of C++”. - MLD