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
 Create from usage not working with std::shared_ptr
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AshMcConnell
Junior Member

16 Posts

Posted - Feb 28 2011 :  05:27:38 AM  Show Profile  Reply with Quote
Hi Folks,

Seems that create from usage doesn't work when using a std::shared_ptr.

e.g.

driver->lastPitSpeedTime = _clock->getTimeMilliseconds();

Where driver is a shared_ptr and lastPitSpeedTime is currently not defined.

It says "refactoring is not available". Also when creating methods it has the same problem: -

driver->setLastPitSpeedTime(_clock->getTimeMilliseconds());

where setLastPitSpeedTime is undefined.


If I have: -

_myLocalMember = _clock->getTimeMilliseconds();

It allows me to create it from usage as a data member (as it's not through a std::shared_ptr)

This is with VS 2010

All the best,
Ash

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Feb 28 2011 :  1:13:01 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=55626

Create from Usage does understand boost::shared_ptr, at least for me. So you might want to consider this, depending on how often you use shared pointers in your code.

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

AshMcConnell
Junior Member

16 Posts

Posted - Feb 28 2011 :  1:15:55 PM  Show Profile  Reply with Quote
Yeah, I was previously using boost, but moved to std::shared_ptr. I am using hundreds of shared_ptrs so i'll hopefully wait for a fix if that is possible. Thanks for the tip though :)

All the best,
Ash
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 12 2011 :  12:50:15 AM  Show Profile  Reply with Quote
case=55626 is fixed in build 1848

Whole Tomato Software, Inc.
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