Skip to content

Commit c5cc093

Browse files
committed
prevent clang++ warning "lookup of 'set' in member access expression is ambiguous; using member of 'mapped_type'"
(also remove explicit ASCII code from previous commit) git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25873 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 244eeeb commit c5cc093

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Compiler/Template/CodegenCpp.tpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,12 @@ case SIMCODE(modelInfo=MODELINFO()) then
509509

510510
#else
511511

512-
using boost::extensions::factory;
513-
BOOST_EXTENSION_TYPE_MAP_FUNCTION
514-
{
515-
types.get<std::map<std::string, factory<IMixedSystem,IGlobalSettings*,boost::shared_ptr<IAlgLoopSolverFactory>,boost::shared_ptr<ISimData>,boost::shared_ptr<ISimVars> > > >()
516-
["<%lastIdentOfPath(modelInfo.name)%>"].set<<%lastIdentOfPath(modelInfo.name)%>Extension>();
517-
518-
}
512+
BOOST_EXTENSION_TYPE_MAP_FUNCTION
513+
{
514+
typedef boost::extensions::factory<IMixedSystem,IGlobalSettings*, boost::shared_ptr<IAlgLoopSolverFactory>, boost::shared_ptr<ISimData>, boost::shared_ptr<ISimVars> > system_factory;
515+
types.get<std::map<std::string, system_factory> >()["<%lastIdentOfPath(modelInfo.name)%>"]
516+
.system_factory::set<<%lastIdentOfPath(modelInfo.name)%>Extension>();
517+
}
519518
#endif
520519
>>
521520
end simulationFactoryFile;
@@ -12614,7 +12613,8 @@ end daeExpIf;
1261412613

1261512614
template encloseInParantheses(String expStr)
1261612615
"Encloses expression in paranthesis if not yet given"
12617-
::= if intEq(stringGet(expStr, 1), 40) then '<%expStr%>' else '(<%expStr%>)'
12616+
::=
12617+
if intEq(stringGet(expStr, 1), stringGet("(", 1)) then '<%expStr%>' else '(<%expStr%>)'
1261812618
end encloseInParantheses;
1261912619

1262012620

0 commit comments

Comments
 (0)