charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Lawrence Kidder <kidder AT astro.cornell.edu>
- To: charm AT cs.uiuc.edu
- Subject: [charm] syntax error compiling interface file
- Date: Tue, 24 Feb 2015 22:23:07 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hello,
I am using templates in a Charm++ code and have encountered
Charmxi syntax error> syntax error
Invalid entry method attribute list
when compiling an interface file.
The problem is illustrated by the following simple example:
I have Typename.C containing:
#include "Typename.decl.h"
template <typename T>
class A : public CBase_A {
public:
A() {}
void help(const typename T::X& arg) {}
};
class B {};
class C { typedef B X; };
class Main : public CBase_Main {
public:
Main(CkArgMsg* m) {}
};
#include "Typename.def.h"
and Typename.ci containing:
mainmodule Typename {
template <typename T>
array [1D] A {
entry A();
entry void help(const typename T::X&);
};
array [1D] A<T>;
mainchare Main {
entry Main(CkArgMsg* m);
};
};
The syntax error is caused by the keyword typename in the entry method A<T>::help
If I remove the keyword template, the interface file will compile, but of course Typename.C no longer compiles because the generated Charm++ methods fail with error: missing 'typename' prior to dependent type name 'T::X'
Is there a special syntax I should be using in the interface file to get this to compile properly?
Thanks,
Larry
- [charm] syntax error compiling interface file, Lawrence Kidder, 02/24/2015
Archive powered by MHonArc 2.6.16.