Skip to content

Commit

Permalink
workaround for gcc bug, template getCollection specialized in differe…
Browse files Browse the repository at this point in the history
…nt namespace
  • Loading branch information
szhorvat committed Oct 31, 2017
1 parent 0b4461e commit 76f5025
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion LTemplate/LTemplateInner.m
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,11 @@
setupCollection[classname_String] := {
CDeclare[collectionType[classname], collectionName[classname]],
"",
CFunction["template<> const " <> collectionType[classname] <> " &", "mma::getCollection<" <> classname <> ">", {},
CInlineCode["namespace mma {"], (* workaround for gcc bug, "specialization of template in different namespace" *)
CFunction["template<> const " <> collectionType[classname] <> " &", "getCollection<" <> classname <> ">", {},
CReturn[collectionName[classname]]
],
CInlineCode["} // mma"],
"",
CFunction["DLLEXPORT void", managerName[classname], {"WolframLibraryData libData", "mbool mode", "mint id"},
CInlineCode@StringTemplate[ (* TODO: Check if id exists, use assert *)
Expand Down

0 comments on commit 76f5025

Please sign in to comment.