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
int main() {
const int i{0};
int& ref{i};
return 0;
}
The above code produces the error message:
error: binding value of type 'void' to reference to type 'int' drops <> qualifiers
int& ref{f.value};
^ ~~~~~~~~~
While the following produces the correct error message:
int main() {
const int i{0};
int& ref = i;
return 0;
}
error: binding value of type 'const int' to reference to type 'int' drops 'const' qualifier
int& ref = i;
Brace-initialization seems to cause an error in the error reporting, unable to access the correct types for the message to display. I'm not familiar with clang internals so I'm not much help here.
The text was updated successfully, but these errors were encountered:
Extended Description
int main() {
const int i{0};
int& ref{i};
return 0;
}
The above code produces the error message:
error: binding value of type 'void' to reference to type 'int' drops <> qualifiers
int& ref{f.value};
^ ~~~~~~~~~
While the following produces the correct error message:
int main() {
const int i{0};
int& ref = i;
return 0;
}
error: binding value of type 'const int' to reference to type 'int' drops 'const' qualifier
int& ref = i;
Brace-initialization seems to cause an error in the error reporting, unable to access the correct types for the message to display. I'm not familiar with clang internals so I'm not much help here.
The text was updated successfully, but these errors were encountered: