Closed ThePhD closed 9 years ago
Add deprecated aliases for backwards compatibility.
You're terrible at branches.
vOv I thought I did it properly.
It's okay bud.
I don't like this new terminology. So I don't know what I'm going to do with this PR.
Probably nothing. It breaks the interface anyways, so I don't know what to do either. usertype
feels like a good name but honestly there's probably better.
Somehow this PR lost its ability to automatically merge lol.
It's because of the goddamn std::size_t
-> int
on the usertype
/ userdata
bits...
I'm tempted to keep it std::size_t and add a specialization for 0 so there's no function to call. Or some proper overloading if I > 0, so clang can properly shut up.
I don't see how that change would cause a merge conflict. You didn't touch that bit so there's no conflict. Odd.
I changed the userdata
line in the gc function to usertype
. Apparently, git's conflating the template <int I>
line with the line below it, and calling the whole thing a merge conflict. v:
This pull request is confirmed to be compatible with the changes to lua-5.3.0, and is backwards compatible with lua-5.2.3. Support for lua-jit is still hanging in the air.
This PR is going to be merged into the develop
branch which is where all v2.0 development will take place.
This pull request anticipates changes to clean up some of the internals from the scars of Visual Studio 2013 and introduce proper support that is actually possible starting with Visual Studio 2015 CTP 2.
It also proposes alternative naming for the
userdata
andnew_userdata
idioms, adopting the termusertype
.usertype
more appropriately encapsulates what we mean, while having enough of the same parts (user
) to, in the API end-user's mind, be similar to lua's concept ofusertype
.This also makes it easier to have an actual
userdata<T>
class that actually represents a userdata, and we can convey semantics (userdata<T>
versususerdata<T&>
versususerdata<T*>
throughpusher
andgetter
, as theunqualified<userdata<T&>>
won't affect the inner specified class).It introduces a deprecation mechanism to make things easier for individuals to transition: the deprecation mechanism has been confirmed to work on Clang, GCC, and VC++.