[AGENT++] patch when using clang compiler
Flaig Cyril
Cyril.Flaig at albistechnologies.com
Wed Dec 18 13:43:58 CET 2013
Hello
I have built the library with g++. Since clang and gcc are binary compatible on linux, I also compiled our a tool that uses agentpp with clang version 3.2.
Clang does not support forward declaration of a template with incomplete type:
e.g.:
line 455 in thread.h:
#if !defined (AGENTPP_DECL_TEMPL_ARRAY_TASKMANAGER)
#define AGENTPP_DECL_TEMPL_ARRAY_TASKMANAGER
AGENTPP_DECL_TEMPL template class AGENTPP_DECL Array<TaskManager>;
#endif
I have found in agent++.h that for MacOS the forward declaration are disabled. When they are also disabled for clang then it compiles fine.
See attached patch.
More information about the AGENTPP
mailing list