Skip to content
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

complete after noexcept doesn't work #371

Open
f-vdb opened this issue Jan 3, 2014 · 1 comment
Open

complete after noexcept doesn't work #371

f-vdb opened this issue Jan 3, 2014 · 1 comment

Comments

@f-vdb
Copy link

f-vdb commented Jan 3, 2014

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

@marvin2k
Copy link

marvin2k commented Jan 3, 2014

"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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants