-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
constexpr is invalid on is2D() #4540
Conversation
compiles fine for me. what version and what env? |
Not sure what you need for env; let me know if you need more. Basically running vsode/platformIO on the current tip of main, only change is adding the vscode 1.97
|
thanks for the feedback. I can see the error but only on ESP32dev env, the _V4 version does work so it seems to be compiler(setting) related. Also other envs based on V4 work fine. |
It is likely a C++ version thing -- IIRC, I'd probably recommend removing |
wled00/FX.h
Outdated
@@ -711,7 +711,7 @@ typedef struct Segment { | |||
void wu_pixel(uint32_t x, uint32_t y, CRGB c); | |||
inline void fill_solid(CRGB c) { fill(RGBW32(c.r,c.g,c.b,0)); } | |||
#else | |||
inline constexpr bool is2D() const { return false; } | |||
inline bool is2D() const { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix the alignment of indentation and I will merge this.
@scourge411 can you also update to latest main to resolve conflict? |
2e7d27c
to
89480c7
Compare
Should be good now. |
647dd69
to
d621173
Compare
thanks. for future reference: don't force push on branches in a PR, it can mess up the review. |
The WLED_DISABLE_2D build flag fails to compile, because the is2D() member of the Segment is not a literal type:
Removing the
constexpr
allows it to compile