luabind icon indicating copy to clipboard operation
luabind copied to clipboard

Used unique_ptr instead of auto_ptr when c++11 is used -- help change the syntax

Open jameslee5656 opened this issue 4 years ago • 7 comments

Hi @Oberon00,

We recently has been working on deprecating auto_ptr usage for our projects. I noticed that Bertram25 has been a while since updating the request. After reviewing some of your thoughts and his changes, we finished building the project and hope to contribute our work to this repo.

jameslee5656 avatar Jul 22 '21 01:07 jameslee5656

This pull request including the following,

  • Make sure that Travis build check is correct
  • auto_ptr patching
  • fix build error in CMakeList.txt (revert our change to match the original one)
  • better handle rvalue and lvalue in scope both in c++11 and c++03
  • keep the const scope in handling c++03 build Without the const seems to cause some memory leak, the tests will fail to past

jameslee5656 avatar Aug 17 '21 01:08 jameslee5656

This looks much nicer. :)

kaetemi avatar Sep 28 '21 05:09 kaetemi

Hey guys, I'm slowly coming back at this. I like the strategy used in this PR and by reading all comments that have been addressed based on mine, I'm pretty sure the only thing left to do is to test it out a bit. :) I'll do that asap.

Bertram25 avatar Dec 16 '21 19:12 Bertram25

Ah also, something we might consider is that in this #32 doc/classes.rst was also updated to reflect the new unique ptr usage.

Bertram25 avatar Dec 16 '21 19:12 Bertram25

So far, I've tested it and the base works great out of the box. I'll keep on testing it for the next few days but so far so good. Thanks for the job done!

Bertram25 avatar Dec 16 '21 21:12 Bertram25

Do we know if there's a chance this PR can be merged? i.e. will @Oberon00 pull the changes when all checks out? It would be nice to not have to maintain our own private branch of this.

kchang718 avatar Dec 22 '21 08:12 kchang718

We're using this PR in our fork for Ryzom Core https://github.com/ryzom/luabind. :)

kaetemi avatar Jan 30 '22 13:01 kaetemi