-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add description for Property and commandline generation #623
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to make the constructor of a property work without explicitly typing out the UserInfo type like: Property({"prop", "value", {"label", "description"}})
?
25bb07f
to
f6eedee
Compare
ping |
f6eedee
to
1b8795b
Compare
Had another iteration where I added generic support for enums (with one minor limitation for integer enums), provided more docs & tests, and fix the casing (camelCase property to hyphenated-case for cmdline option). |
1b8795b
to
9db0e9e
Compare
retest this please |
9db0e9e
to
9ca085b
Compare
{ | ||
public: | ||
PropertyMap() = default; | ||
enum class Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase members?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a different refactoring, no?
{ | ||
assertValidType<T>(); | ||
|
||
if (std::is_same<T, double>::value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to use if constexpr
if it wasn't C++17, but the compiler should be able to optimize out the dead branches anyway.
template <typename T> | ||
T _castValue(const boost::any& v) const | ||
{ | ||
_checkType<T>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for not relying on boost::bad_cast? If is performing undesired type promotions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know. I moved the code only, @karjonas was the original author of that.
9ca085b
to
46cc99d
Compare
No description provided.