pros
pros copied to clipboard
feat: :sparkles: Make controller ctor constexpr
Summary:
Changes the pros::Controller constructor to be constexpr.
Motivation:
Allows pros::Controller instances to be declared constinit/constexpr.
Test Plan:
- [x] Check it compiles
- [ ] Check that
Controllerinstances can be declared asconstinit/constexpr.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
While you're doing this, what other ctors should this be applied to? I imagine this isn't the only one.
While you're doing this, what other ctors should this be applied to? I imagine this isn't the only one.
The issue is that some device ctors can't be made constexpr becuase they touch global state (changing this would require a breaking change to the PROS API which I don't think is gonna happen now), it feels a bit weird to have some devices with constexpr ctors and others without.