|
AsTare - Thanks for the bug report. Looks like you are right. The obvious fix would be to just reverse the field order in the constructor call inside element.cpp. But it is weird that the fields are declared in the order that they are in b_timestamp - it looks backwards to me. Unfortunately, swapping the field order there isn't an option, since that could silently change the meaning of working code. We should probably make the obvious fix now and backport to a 3.2.1. Long term, we should think about a better structure for b_timestamp that doesn't admit this sort of reversal, as this is the second field order bug we have had with b_timestamp: see CXX-1367.
CC ajdavis - I propose we make the obvious fix on master, backport for a 3.2.1, and file a follow-up ticket to make it hard to use b_timestamp wrong. Given that the non-ordinal field has semantics as seconds since the unix epoch, and that std::chrono::seconds has an explicit constructor, perhaps giving a future b_timestamp type a constructor where the first argument took a std::chrono::seconds would fix this?
|