Merge remote-tracking branch 'origin/develop' into sol3

# Conflicts:
#	include/single/sol/sol.hpp
#	include/single/sol/sol_forward.hpp
This commit is contained in:
ThePhD 2018-11-09 08:26:27 -08:00
commit f75d335988
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ If you don't specify any constructor options at all and the type is `default_con
- If you pass the ``constructors<...>`` argument first when constructing the usertype, then it will automatically be given a ``"{name}"`` of ``"new"``
* ``"{name}", sol::initializers( func1, func2, ... )``
- Used to handle *initializer functions* that need to initialize the memory itself (but not actually allocate the memory, since that comes as a userdata block from Lua)
- Given one or more functions, provides an overloaded Lua function for creating a the specified type
- Given one or more functions, provides an overloaded Lua function for creating the specified type
+ The function must have the argument signature ``func( T*, Arguments... )`` or ``func( T&, Arguments... )``, where the pointer or reference will point to a place of allocated memory that has an uninitialized ``T``. Note that Lua controls the memory, so performing a ``new`` and setting it to the ``T*`` or ``T&`` is a bad idea: instead, use ``placement new`` to invoke a constructor, or deal with the memory exactly as you see fit
* ``{anything}, sol::factories( func1, func2, ... )``
- Used to indicate that a factory function (e.g., something that produces a ``std::unique_ptr<T, ...>``, ``std::shared_ptr<T>``, ``T``, or similar) will be creating the object type

View File

@ -122,7 +122,7 @@ namespace sol {
template <typename... Ret, typename... Args>
decltype(auto) call(Args&&... args) {
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191200000
#if !defined(__clang__) && defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191200000
// MSVC is ass sometimes
return get<protected_function>().call<Ret...>(std::forward<Args>(args)...);
#else

View File

@ -126,7 +126,7 @@ namespace sol {
template <typename... Ret, typename... Args>
decltype(auto) call(Args&&... args) {
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191200000
#if !defined(__clang__) && defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191200000
// MSVC is ass sometimes
return get<function>().call<Ret...>(std::forward<Args>(args)...);
#else