Update of /cvsroot/luabind/luabind/luabind/luabind/detail
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11818/detail
Modified Files:
Tag: beta7-devel2
call.hpp signature_match.hpp
Added Files:
Tag: beta7-devel2
most_derived.hpp
Log Message:
Fixed problem with missing most_derived<> in signature_match.hpp.
Index: signature_match.hpp
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/luabind/detail/signature_match.hpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -d -r1.3.2.1 -r1.3.2.2
--- signature_match.hpp 27 Jul 2005 21:25:40 -0000 1.3.2.1
+++ signature_match.hpp 18 Oct 2005 17:46:56 -0000 1.3.2.2
@@ -48,6 +48,7 @@
#include <luabind/detail/primitives.hpp>
#include <luabind/detail/object_rep.hpp>
#include <luabind/detail/class_rep.hpp>
+#include <luabind/detail/most_derived.hpp>
namespace luabind
{
@@ -189,7 +190,7 @@
, Policies const*)
{
typedef constructor<
- T&
+ typename most_derived<T,WrappedClass>::type&
BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
> params_t;
@@ -213,7 +214,7 @@
, Policies const* policies)
{
typedef constructor<
- T const&
+ typename most_derived<T,WrappedClass>::type const&
BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
> params_t;
return match_params(
Index: call.hpp
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/luabind/detail/call.hpp,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- call.hpp 7 Aug 2004 13:37:10 -0000 1.6
+++ call.hpp 18 Oct 2005 17:46:56 -0000 1.6.2.1
@@ -41,6 +41,8 @@
#include <luabind/detail/policy.hpp>
#include <luabind/yield_policy.hpp>
+#include <luabind/detail/most_derived.hpp>
+
#define LUABIND_DECL(z, n, off) \
typedef typename find_conversion_policy< \
n + off \
@@ -92,16 +94,6 @@
}
};
- template<class Class, class WrappedClass>
- struct most_derived
- {
- typedef typename boost::mpl::if_<
- boost::is_base_and_derived<Class, WrappedClass>
- , WrappedClass
- , Class
- >::type type;
- };
-
template<class T>
struct returns
{
--- NEW FILE: most_derived.hpp ---
// Copyright (c) 2005 Daniel Wallin and Arvid Norberg
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
// OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef MOST_DERIVED_051018_HPP
# define MOST_DERIVED_051018_HPP
# include <boost/mpl/if.hpp>
# include <boost/type_traits/is_base_and_derived.hpp>
namespace luabind { namespace detail {
template<class Class, class WrappedClass>
struct most_derived
{
typedef typename boost::mpl::if_<
boost::is_base_and_derived<Class, WrappedClass>
, WrappedClass
, Class
>::type type;
};
}} // namespace luabind::detail
#endif // MOST_DERIVED_051018_HPP
|