Skip to content
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

Update troubleshooting guide #319

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions au/error_examples.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ void example_private_constructor() {
constexpr QuantityD<Meters> length{5.5};
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// SECTION: ...

void example_input_to_maker() {
constexpr auto x = meters(1);
constexpr auto x_pt = meters_pt(1);

// A (BROKEN): passing something that is already a quantity to a quantity maker.
meters(x);

// B (BROKEN): same as above, but with quantity _points_.
meters_pt(x_pt);
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// SECTION: Dangerous conversion

Expand Down
Loading
Loading