Archived
This forum has been archived. Please start a new discussion on GitHub.
error ServiceInstanceDescriptor
when i try to get the value of template from that struct ServiceInstanceDescriptor I have an error :
error: ‘template’ (as a disambiguator) is only allowed within templates
I use kubuntu 8.04 and gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
error: ‘template’ (as a disambiguator) is only allowed within templates
I use kubuntu 8.04 and gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
0
Comments
-
Sorry, but I don't really understand your question. Can you be more specific please? XML descriptors, and code (if appropriate) would help in diagnosing your issue.0
-
when I try to read data member "template" from "ServiceInstanceDescriptor" struct in cpp, I recive an error like that:
error: ‘template’ (as a disambiguator) is only allowed within templates
so I think that is usefull change the data member name.
the data member of "ServiceInstanceDescriptor" are :
string template;
StringStringDict parameterValues;
ServiceDescriptor descriptor;
PropertySetDescriptor propertySet;
for example :IceGrid::IceBoxDescriptorPtr iceBox = IceGrid::IceBoxDescriptorPtr::dynamicCast( *ser ); for ( IceGrid::ServiceInstanceDescriptorSeq::iterator srv( iceBox->services.begin() ) ; srv != iceBox->services.end() ; srv++ ) { std::string aux = srv->template; }
0 -
See 4.5.3 in the Ice manual. slice identifiers that are keywords in an implementation language (such as template in C++) are escaped during translation. For C++ _cpp_ is appended to the start of the identifier. Therefore, you should use _cpp_template, not template in your C++ code.0
-
thanks a lot0