Skip to content

Conversation

@nilsdeppe
Copy link
Member

Proposed changes

This makes creating local labels easy. For example, a private struct in a class
could be used as the label.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    major new feature if appropriate.

Further comments

static Auto<T, Label> create(const Option& options) {
try {
if (options.parse_as<std::string>() == get_output(Label)) {
if (options.parse_as<std::string>() == pretty_type::short_name<Label>()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about using something like Options::name<Label>() so that the defining string can be overloaded with a name() function or similar?


std::ostream& operator<<(std::ostream& os, AutoLabel label) noexcept;
namespace AutoLabel {
/// Automatically determine the default label
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't automatically determine the label, it just reads 'Auto' in the input file :) So just write 'Auto' label

This makes creating local labels easy. For example, a private struct in a class
could be used as the label.
@nilsdeppe nilsdeppe force-pushed the auto_label_as_type branch from a9b1257 to eee6cfb Compare July 13, 2021 18:32
@nilsdeppe
Copy link
Member Author

I've rebased on develop and squashed in the changes. Thanks for the reviews :)

@nilsvu nilsvu merged commit ac739a7 into sxs-collaboration:develop Jul 14, 2021
@nilsdeppe nilsdeppe deleted the auto_label_as_type branch September 5, 2021 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants