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
structInfoEntry
{
bool Value;
constexprInfoEntry(bool Value) : Value(Value) {}
};
structInfoDict
{
InfoEntry Entry[1];
constexprInfoDict(InfoEntry Entry):Entry({Entry}){}
//constexpr InfoDict(InfoEntry Entry):Entry{Entry}{} //This line is OK. Only differs in the should-be-optional parenthesis.
};
voidsetup()
{
constexpr InfoDict ID(InfoEntry(true));
//constexpr InfoDict ID(true); //This line is OK. It looks like the compiler can only handle POD types here.
}
voidloop()
{}
Environments:
v1.8.5
-std=gnu++17
Arduino Mega or Mega 2560
Arduino IDE 2.0.0
Windows 11
Full error prompt:
C:\Users\vhtmf\Documents\Arduino\sketch_sep21a\sketch_sep21a.ino: In function 'void setup()':
C:\Users\vhtmf\Documents\Arduino\sketch_sep21a\sketch_sep21a.ino:13:40: in constexpr expansion of 'InfoDict(InfoEntry(true))'
C:\Users\vhtmf\Documents\Arduino\sketch_sep21a\sketch_sep21a.ino:13:40: internal compiler error: in verify_ctor_sanity, at cp/constexpr.c:2697
constexpr InfoDict ID(InfoEntry(true));
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
exit status 1
Compilation error: exit status 1
The text was updated successfully, but these errors were encountered:
Minimal repro demo:
Environments:
Full error prompt:
The text was updated successfully, but these errors were encountered: