A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/aeron-io/simple-binary-encoding/issues/528 below:

C++ wrong block length with constant enums · Issue #528 · aeron-io/simple-binary-encoding · GitHub

Having the following enum definition

<enum name="Enum1" encodingType="uint8">
    <validValue name="Val1">0</validValue>
    <validValue name="Val2">1</validValue>
    <validValue name="Val3">2</validValue>
</enum> 

and the following message:

<message name="Msg1" id="1" description="TestMessage">
    <field name="field1" id="20" type="Enum1" presence="constant" valueRef="Enum1.Val2"/>
</message>

Generates right constant value for "field1" (which is expected)

Enum1::Value field1() const SBE_NOEXCEPT
{
    return Enum1::Value::Val2;
}

But wrong block length (expected to be 0)

static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
{
    return (std::uint16_t)1;
}

Reproduced with v1.7.4


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4