Skip to content

Conversation

@chiphogg
Copy link
Member

This unlocks some basic missing functionality for Constant and
SymbolFor: namely, we should be able to pass instances of them to
squared(), sqrt(), pow<N>(), root<N>(), and so on.

Fixes #375.

This unlocks some basic missing functionality for `Constant` and
`SymbolFor`: namely, we should be able to pass instances of them to
`squared()`, `sqrt()`, `pow<N>()`, `root<N>()`, and so on.

Fixes #375.
@chiphogg chiphogg added the release notes: ✨ lib (enhancement) PR enhancing the library code label Jan 15, 2025
Copy link
Contributor

@geoffviola geoffviola left a comment

Choose a reason for hiding this comment

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

Motivation, implementation, and tests look good.

StaticAssertTypeEq<decltype(root<8>(mol)), UnitWrapper<decltype(root<8>(Moles{}))>>();
}

// UnitWrapper<Meters>{} * meters_pt;
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: Are these tests irrelevant now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops... actually, no! We deleted ForbidsComposingWith in #227, so I thought we forgot to remove this, but reading that PR summary I see that leaving these here was intentional.

@chiphogg chiphogg merged commit 6d0f7c0 into main Jan 15, 2025
14 checks passed
@chiphogg chiphogg deleted the chiphogg/powers-of-wrappers#375 branch January 15, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: ✨ lib (enhancement) PR enhancing the library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constant and SymbolFor do not support rational powers

3 participants