Description
Using SBE Tool v1.7.9:
Because the field is not constexpr we cannot use this methods in template metaprogramming, and instead we have created python scripts to post process and fix the generated code
Given the following schema: (escaped < below)
<types>
<enum name="EnumSBESample" encodingType="uint8" semanticType="EnumSBESample">
<validValue name="a">0</validValue>
<validValue name="b">1</validValue>
</enum>
</types>
<sbe:message name="MsgSBESample" id="1023" semanticType="MsgSBESample">
<field name="fieldConstant" id="1" type="EnumSBESample" presence="constant" semanticType="EnumSBESample" valueRef="EnumSBESample.a" />
</sbe:message>
Consider generating
static SBE_CONSTEXPR EnumSBESample::Value fieldConstant() SBE_NOEXCEPT
{ return EnumSBESample::Value::a; }
Instead of
EnumSBESample::Value fieldConstant() const SBE_NOEXCEPT
{ return EnumSBESample::Value::a; }