- Notifications
You must be signed in to change notification settings - Fork 556
Closed
Description
There is a bug in C++ code generator.
I attach simple XML schema test.zip to reproduce the bug.
Command to generate C++ code is:
$ java -Dsbe.target.language=Cpp -Dsbe.output.dir=./test_src -Dsbe.errorLog=yes -jar sbe-all-1.21.0.jar ./test.xml
There is throw std::runtime_error("buffer too short for flyweight [[E107]") in the GroupSize constructor. So an exception of type std::runtime_error may be thrown but the throw list noexcept doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate(). You should delete SBE_NOEXCEPT.
inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); dimensions.numInGroup(static_cast<std::uint8_t>(m_count)); return m_count; } Metadata
Metadata
Assignees
Labels
No labels