Changeset 186


Ignore:
Timestamp:
08/03/13 07:43:24 (12 years ago)
Author:
epyon
Message:
  • lua/values - descendants of object* will now properly be passed to lua
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/lua/lua_values.hh

    r185 r186  
    88#define NV_LUA_VALUES_HH
    99
     10#include <type_traits>
    1011#include <nv/common.hh>
    1112#include <nv/string.hh>
     
    5253                        void push_value( lua_State *L, object* o );
    5354                        void push_value( lua_State *L, void* p );
     55
     56                        template< typename D >
     57                        typename std::enable_if<std::is_base_of<object, D>::value>::type
     58                                push_value( lua_State *L, D* o )
     59                        {
     60                                push_value( L, (object*)o );
     61                        }
     62
    5463                        template < typename T >
    5564                        void push_value( lua_State *L, const T& p )
Note: See TracChangeset for help on using the changeset viewer.