[Github-comments] [geany] Rewrite scope completion 3 (#862)

Colomban Wendling notifications at xxxxx
Mon Jan 18 21:43:17 UTC 2016


Scope completion doesn't seem to like not being called at the root scope or on a scoped type:
```c++
namespace ns {
	class C {
	public:
		void func() {}
		int memb;
	};
	
	C c;
	
	void dummy() {
		c.func(); // no autoc on c.
	}
};

ns::C c2;

int main (void) {
	return c2.memb; // neither on c2.
}
```
(Same if trying to autoc outside a func).
Any reason?  it's not limited to namespaces, same happens with e.g. a class.

----

However, I must say this is beautiful:
```c++
class C;

class A {
public:
	C *bar;
};

class B {
public:
	A foo;
};

class C {
public:
	B *func() {
		return &b;
	}
	int memb;
	B b;
};

C c;

int main (void) {
	// scope completion all the way, with only sensible stuff :)
	return c.b.foo.bar->b.foo.bar->b.foo.bar->func()->foo.bar->memb;
}
```

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/862#issuecomment-172661976
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160118/8717a964/attachment.html>


More information about the Github-comments mailing list