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
// filename: my.h
struct A {
int i;
void setI(int a) { i = a; }
int getI() const { return i;
};
// file: test.cpp
include
include "my.h"
using namespace std;
int main() {
struct B {
A a;
B (int x) { a.setI(x); }
float x() const { return a.getI(); } // <-- here the completion
// a.g "press tab" works
// in the next line the completion doesn't work
// it has something to do with the noexcept keyword
float y() const noexcept { return a.getI(); } // <-- here the completion
// a.g "press tab" doesn't work
};
B b(23);
cout << b.x() << endl;
cout << b.y() << endl;
}
I don't undestand it.
Is this an issue or is this my fault.
Thank you for reading.
Frank
The text was updated successfully, but these errors were encountered:
"noexcept" is a c++11 feature, maybe adding "-std=c++0x" to the clang-option (or the .clang_complete) helps?
however, adding a "throw" inside the marked function does not lead to an compile-time error? gcc and clang happily eat this...
Hello,
please look to the file my.h and test.cpp
// filename: my.h
struct A {
int i;
void setI(int a) { i = a; }
int getI() const { return i;
};
// file: test.cpp
include
include "my.h"
using namespace std;
int main() {
struct B {
A a;
B (int x) { a.setI(x); }
float x() const { return a.getI(); } // <-- here the completion
// a.g "press tab" works
// in the next line the completion doesn't work
// it has something to do with the noexcept keyword
float y() const noexcept { return a.getI(); } // <-- here the completion
// a.g "press tab" doesn't work
};
B b(23);
cout << b.x() << endl;
cout << b.y() << endl;
}
I don't undestand it.
Is this an issue or is this my fault.
Thank you for reading.
Frank
The text was updated successfully, but these errors were encountered: