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
 A case where "move" to implementation fails
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Dec 03 2023 :  3:54:05 PM  Show Profile  Reply with Quote

// test.h:
#pragma once

struct Bar { int x = 0; };

class Test
{
   void Foo(Bar c = Bar{})
   {
   }
};

// test.cpp
#include "Test.h"


Selecting `Foo`and calling "Move to implementation") (through the refactor contexct menu) causes butchered code:




// test.h:
class Test
{
   void Foo(Bar c = Bar;
};
 
// test.cpp
#include "Test.h"

Bar Test::Foo()
{
})
{
}


----

License: Standard ([email protected] / 5DAL-7UA8CM-4SW9KL-32PD) Support ends 2024.12.02
VA_X64.dll file version 10.9.2491.0 built 2023.05.24
DevEnv.exe version 17.8.34322.80 Community
msenv.dll version 17.0.34322.80
Comctl32.dll version 6.10.22621.2506
Windows 11 11.0 23H2 Build 22631 (remote)
16 processors (x86-64)
Language info: 1252, 0x407

Platform: Project defined
Stable Includes:
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\include;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include;

Other Includes:

Stable Source Directories:
C:\Program Files (x86)\Windows Kits\10\Source\10.0.22621.0\ucrt;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\src;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\crt\src;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\src\atl;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\src\mfcm;
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\src\mfc;

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Dec 04 2023 :  07:41:43 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=163931

Apparently our braced initialization support still needs some more work. Hopefully you aren't running into this all the time.

zen is the art of being at one with the two'ness
Go to Top of Page

peterchen
Tomato Guru

126 Posts

Posted - Dec 04 2023 :  10:54:24 AM  Show Profile  Reply with Quote
Thanks! Nice to see you here still :)
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