With stuct/union containing unnamed fields of struct/union type, the CodeSense doesn't display the field names inside these unnamed fields. For example
typedef struct _test {
int a;
union {
int b;
int c;
};
int d;
} TEST;
int main()
{
TEST xx;
xx.a=1;
xx.b=3;
...
}
When "xx." above is typed, CodeSense shows all fields of TEST except for fields 'b' and 'c' which are inside unnamed union (these fields have to have unique names within the structure i.e. one cannot have 'a' or 'd' inside the 'union' above).
The VS CodeSense shows all fields, including 'b' and 'c'. It would be much more useful if C::B were to show all fields as well.
xx.a
xx.b
xx.c
xx.d
all the above should be auto prompted?
Yes, but then the CodeSense inserts as the field name the string UnnamedUnionXXX.b into the code, rather than just b.I mean I can put it in my to-do list and implement this feature.
#include <iostream>
using namespace std;
class A
{
public:
struct
{
int a;
int b;
};
int c;
};
int main()
{
A a;
a.a = 1;
a.b = 2;
a.c = 3;
cout << a.a << a.b << a.c << endl;
return 0;
}
like this code, shoud be fixed too.Code#include <iostream>
using namespace std;
class A
{
public:
struct
{
int a;
int b;
};
int c;
};
int main()
{
A a;
a.a = 1;
a.b = 2;
a.c = 3;
cout << a.a << a.b << a.c << endl;
return 0;
}
But more test will be done before the patch released. :D
Nightly of codecompletion-refactoring branch.But more test will be done before the patch released. :D
Is it going to be in the nightly releases or as a patch to the distribution?