Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Refactoring Bug-designated initializer,C99/Clang
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

smallscript
New Member

USA
3 Posts

Posted - Feb 10 2017 :  11:30:50 AM  Show Profile  Reply with Quote
MSVC (ANSI) C99, supports designated initializers, as does Clang in C++.

With structs initialized using C99 designated initializers, the refactoring tool breaks any code containing members being refactored/renamed because it does not recognize them.

-- David

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Feb 10 2017 :  3:49:39 PM  Show Profile  Reply with Quote
Do you mean code like this:

struct Person
{   
    int height;
    int weight;
    int age;
};

int main()
{
    Person p { .age = 18 };
}


which I picked up from here:

http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99

If so, which IDE are you working in? This does not compile in C++ in VS2017 RC4.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000