Skip to content

Conversation

@aalkin
Copy link
Member

@aalkin aalkin commented Jul 5, 2021

  • 8,16,32 and 64bit unsigned ints are added to Variant
  • Update serialization handlers to support these types in ConfigParamSpec and Configurable
  • Note that uint8_t is considered a character when parsing command line arguments

@aalkin aalkin requested a review from a team as a code owner July 5, 2021 07:21
@ktf
Copy link
Member

ktf commented Jul 5, 2021

Ok, but how do you manage the fact that --foo 1 is an unsigned int rather than an int?

@aalkin
Copy link
Member Author

aalkin commented Jul 5, 2021

Ok, but how do you manage the fact that --foo 1 is an unsigned int rather than an int?

The type is determined by ConfigParamSpec (more precisely with boost option made from it), boost will use iostream to pick up the value with designated type. There may be some funny stuff happening for --foo -1 for usigned foo, I will add a test...

@ktf
Copy link
Member

ktf commented Jul 5, 2021

There may be some funny stuff happening for --foo -1 for usigned foo, I will add a test...

Thanks.

@aalkin
Copy link
Member Author

aalkin commented Jul 5, 2021

I've checked explicitly, it behaves according to c++ rules for implicit type conversions (used by iostream), for example, for uint16_t foo, --foo -1 would set it to 65535. I do not believe we need an extra test for this.

@jgrosseo jgrosseo merged commit f12c60c into AliceO2Group:dev Jul 12, 2021
@aalkin aalkin deleted the extend-variant branch July 21, 2021 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants