-
Key: CPP13-66
-
Legacy Issue Number: 6413
-
Status: open
-
Source: AT&T ( Duncan Grisby)
-
Summary:
The second-to-last paragraph of section 1.17.10.3 says
"For valuetypes that have no operations or initializers, a concrete type-specific factory class is generated whose implementation of the create_for_unmarshal function simply constructs an instance of the OBV_ class for the valuetype using new and the default constructor."
As specified, that requires the generation of invalid C++. The OBV_ class is abstract since it does not have implementations of the ValueBase reference counting functions.
Perhaps the intention is that the OBV_ classes in such cases should derive from DefaultValueRefCountBase. However, the wording and explanation in section 1.17.6 explicitly forbids this:
"Note that it is the application-supplied concrete valuetype classes that must derive from these mix-in classes, not the valuetype classes generated by the IDL compiler."
One solution that avoids the problem, and avoids restricting the application's use of the OBV_ classes is to generate yet another class that derives from both the OBV_ class and DefaultValueRefCountBase, for instantiation by the _init class's create_for_unmarshal function.
-
Reported: CPP 1.1 — Mon, 3 Nov 2003 05:00 GMT
-
Updated: Fri, 6 Mar 2015 20:58 GMT