You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduino IDE version (found in Arduino -> About Arduino menu): N/a
Feature Request: constexpr constructors for DateTime / TimeSpan
This would allow me to generate helpful error messages at compile time for DateTimes/TimeSpans that are invalid in a certain context using static_assert. Previously I have used run-time checks with Serial.println, but this method only catches mistakes if developers are looking at their serial console.
I think this is as simple as marking the constructors constexpr, but I might be missing something
The text was updated successfully, but these errors were encountered:
After some investigation, most TimeSpan constructors can be made constexpr, but most DateTime constructors can't without C++14 constexpr features (Arduino currently uses C++11 by default).
Arduino board: All; N/a
Arduino IDE version (found in Arduino -> About Arduino menu): N/a
Feature Request:
constexpr
constructors forDateTime
/TimeSpan
This would allow me to generate helpful error messages at compile time for
DateTimes
/TimeSpans
that are invalid in a certain context usingstatic_assert
. Previously I have used run-time checks with Serial.println, but this method only catches mistakes if developers are looking at their serial console.I think this is as simple as marking the constructors
constexpr
, but I might be missing somethingThe text was updated successfully, but these errors were encountered: