fix nested C++ template syntax
Merge pull request #317 from larsmans/nested_templates

fix bug in nested C++ template syntax