problem binding template union

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

problem binding template union

Domino-2
Hi,

I have a problem binding template union into luabind. Following code gives me
error C3200: 'ABC_' : invalid template argument for template parameter 'F', expected a class template boost_1_37_0\boost\mpl\aux_\preprocessed\plain\full_lambda.hpp 131
I know that this is boost::lambda but maybe some of you already faced the same problem and have some idea how to solve it.


template<class T>
union SMatrix_
{
  T   m[4][4];

  struct SMatrix
  {
    T m00, m01, m02, m03;
    T m10, m11, m12, m13;
    T m20, m21, m22, m23;
    T m30, m31, m32, m33;
  };

  // constructors
  SMatrix_<T>() {}
  SMatrix_<T>( const SMatrix_<T>& ) {}
};

typedef SMatrix_<float> SMatrixf;

// ...
luabind::module(pLua)
[
  luabind::class_<SMatrixf>("SMatrixf")
    .def(luabind::constructor<>())
];

Thanks,
D.

----------------------------------------------------------------------
Speak Up. Angielski szybko i skutecznie. 3 miesiace nauki gratis.
Sprawdz. >> http://link.interia.pl/f2019


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: problem binding template union

Daniel Wallin
Domino wrote:
> Hi,
>
> I have a problem binding template union into luabind. Following code
> gives me error C3200: 'ABC_' : invalid template argument for template
> parameter 'F', expected a class template
> boost_1_37_0\boost\mpl\aux_\preprocessed\plain\full_lambda.hpp 131 I
> know that this is boost::lambda but maybe some of you already faced
> the same problem and have some idea how to solve it.

Could you please post the complete error message? It's impossible to
debug this without the instantiation back trace.

--
Daniel Wallin
BoostPro Computing
http://www.boostpro.com


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: problem binding template union

Domino-2
>Could you please post the complete error message? It's impossible to
>debug this without the instantiation back trace.

Yep, here it goes...

1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\full_lambda.hpp(1
31) : error C3200: 'SMatrix_' : invalid template argument for template
parameter 'F', expected a class template
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\full_lambda.hpp(2
03) : see reference to class template instantiation
'boost::mpl::lambda<T,Tag>' being compiled
1>        with
1>        [
1>            T=SMatrixf,
1>            Tag=boost::mpl::void_
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\full_lambda.hpp(4
67) : see reference to class template instantiation
'boost::mpl::lambda<T,Tag>' being compiled
1>        with
1>        [
1>            T=boost::is_base_and_derived<SMatrixf,boost::mpl::_>,
1>            Tag=boost::mpl::void_
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\apply.hpp(40) :
see reference to class template instantiation 'boost::mpl::lambda<T>' being
compiled
1>        with
1>        [
1>
T=boost::mpl::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost
::is_base_and_derived<SMatrixf,boost::mpl::_>>
1>        ]
1>        f:\toolkits\boost_1_36_0\boost\mpl\aux_\iter_apply.hpp(28) : see
reference to class template instantiation 'boost::mpl::apply1<F,T1>' being
compiled
1>        with
1>        [
1>
F=boost::mpl::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost
::is_base_and_derived<SMatrixf,boost::mpl::_>>,
1>            T1=luabind::detail::unspecified
1>        ]
1>        f:\toolkits\boost_1_36_0\boost\mpl\not.hpp(41) : see reference to
class template instantiation 'boost::mpl::aux::iter_apply1<F,Iterator>'
being compiled
1>        with
1>        [
1>
F=boost::mpl::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost
::is_base_and_derived<SMatrixf,boost::mpl::_>>,
1>
Iterator=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified
,luabind::detail::unspecified,luabind::detail::unspecified>,0>
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\and.hpp(25) : see
reference to class template instantiation 'boost::mpl::not_<T>' being
compiled
1>        with
1>        [
1>
T=boost::mpl::aux::iter_apply1<boost::mpl::and_<luabind::detail::is_not_unsp
ecified<boost::mpl::_1>,boost::is_base_and_derived<SMatrixf,boost::mpl::_>>,
boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified,luabind:
:detail::unspecified,luabind::detail::unspecified>,0>>
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\and.hpp(55) : see
reference to class template instantiation
'boost::mpl::aux::and_impl<C_,T1,T2,T3,T4>' being compiled
1>        with
1>        [
1>            C_=true,
1>
T1=boost::mpl::apply1<boost::mpl::protect<boost::mpl::aux::find_if_pred<boos
t::mpl::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost::is_b
ase_and_derived<SMatrixf,boost::mpl::_>>>>,boost::mpl::v_iter<boost::mpl::ve
ctor3<luabind::detail::unspecified,luabind::detail::unspecified,luabind::det
ail::unspecified>,0>>,
1>            T2=boost::mpl::true_,
1>            T3=boost::mpl::true_,
1>            T4=boost::mpl::true_
1>        ]
1>        f:\toolkits\boost_1_36_0\boost\mpl\iter_fold_if.hpp(46) : see
reference to class template instantiation 'boost::mpl::and_<T1,T2>' being
compiled
1>        with
1>        [
1>
T1=boost::mpl::not_<boost::is_same<boost::mpl::v_iter<boost::mpl::vector3<lu
abind::detail::unspecified,luabind::detail::unspecified,luabind::detail::uns
pecified>,0>,boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspeci
fied,luabind::detail::unspecified,luabind::detail::unspecified>,3>>>,
1>
T2=boost::mpl::apply1<boost::mpl::protect<boost::mpl::aux::find_if_pred<boos
t::mpl::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost::is_b
ase_and_derived<SMatrixf,boost::mpl::_>>>>,boost::mpl::v_iter<boost::mpl::ve
ctor3<luabind::detail::unspecified,luabind::detail::unspecified,luabind::det
ail::unspecified>,0>>
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49
) : see reference to class template instantiation
'boost::mpl::aux::iter_fold_if_pred<Predicate,LastIterator>::apply<State,Ite
rator>' being compiled
1>        with
1>        [
1>
Predicate=boost::mpl::protect<boost::mpl::aux::find_if_pred<boost::mpl::and_
<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost::is_base_and_deri
ved<SMatrixf,boost::mpl::_>>>>,
1>
LastIterator=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspeci
fied,luabind::detail::unspecified,luabind::detail::unspecified>,3>,
1>            State=void,
1>
Iterator=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified
,luabind::detail::unspecified,luabind::detail::unspecified>,0>
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\apply.hpp(63) :
see reference to class template instantiation
'boost::mpl::apply_wrap2<F,T1,T2>' being compiled
1>        with
1>        [
1>
F=boost::mpl::protect<boost::mpl::aux::iter_fold_if_pred<boost::mpl::protect
<boost::mpl::aux::find_if_pred<boost::mpl::and_<luabind::detail::is_not_unsp
ecified<boost::mpl::_1>,boost::is_base_and_derived<SMatrixf,boost::mpl::_>>>
>,boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified,luabin
d::detail::unspecified,luabind::detail::unspecified>,3>>>,
1>            T1=void,
1>
T2=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified,luabi
nd::detail::unspecified,luabind::detail::unspecified>,0>
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\iter_fold_if_impl
.hpp(62) : see reference to class template instantiation
'boost::mpl::apply2<F,T1,T2>' being compiled
1>        with
1>        [
1>
F=boost::mpl::protect<boost::mpl::aux::iter_fold_if_pred<boost::mpl::protect
<boost::mpl::aux::find_if_pred<boost::mpl::and_<luabind::detail::is_not_unsp
ecified<boost::mpl::_1>,boost::is_base_and_derived<SMatrixf,boost::mpl::_>>>
>,boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified,luabin
d::detail::unspecified,luabind::detail::unspecified>,3>>>,
1>            T1=void,
1>
T2=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified,luabi
nd::detail::unspecified,luabind::detail::unspecified>,0>
1>        ]
1>
f:\toolkits\boost_1_36_0\boost\mpl\aux_\preprocessed\plain\iter_fold_if_impl
.hpp(101) : see reference to class template instantiation
'boost::mpl::aux::iter_fold_if_forward_step<Iterator,State,ForwardOp,Predica
te>' being compiled
1>        with
1>        [
1>
Iterator=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified
,luabind::detail::unspecified,luabind::detail::unspecified>,0>,
1>            State=void,
1>            ForwardOp=boost::mpl::arg<1>,
1>
Predicate=boost::mpl::protect<boost::mpl::aux::iter_fold_if_pred<boost::mpl:
:protect<boost::mpl::aux::find_if_pred<boost::mpl::and_<luabind::detail::is_
not_unspecified<boost::mpl::_1>,boost::is_base_and_derived<SMatrixf,boost::m
pl::_>>>>,boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecifie
d,luabind::detail::unspecified,luabind::detail::unspecified>,3>>>
1>        ]
1>        f:\toolkits\boost_1_36_0\boost\mpl\iter_fold_if.hpp(94) : see
reference to class template instantiation
'boost::mpl::aux::iter_fold_if_impl<Iterator,State,ForwardOp,ForwardPredicat
e,BackwardOp,BackwardPredicate>' being compiled
1>        with
1>        [
1>
Iterator=boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::unspecified
,luabind::detail::unspecified,luabind::detail::unspecified>,0>,
1>            State=void,
1>            ForwardOp=boost::mpl::arg<1>,
1>
ForwardPredicate=boost::mpl::protect<boost::mpl::aux::iter_fold_if_pred<boos
t::mpl::protect<boost::mpl::aux::find_if_pred<boost::mpl::and_<luabind::deta
il::is_not_unspecified<boost::mpl::_1>,boost::is_base_and_derived<SMatrixf,b
oost::mpl::_>>>>,boost::mpl::v_iter<boost::mpl::vector3<luabind::detail::uns
pecified,luabind::detail::unspecified,luabind::detail::unspecified>,3>>>,
1>            BackwardOp=boost::mpl::na,
1>            BackwardPredicate=boost::mpl::always<boost::mpl::false_>
1>        ]
1>        f:\toolkits\boost_1_36_0\boost\mpl\iter_fold_if.hpp(102) : see
reference to class template instantiation
'boost::mpl::iter_fold_if<Sequence,State,ForwardOp,ForwardPredicate>::result
_' being compiled
1>        with
1>        [
1>
Sequence=boost::mpl::vector3<luabind::detail::unspecified,luabind::detail::u
nspecified,luabind::detail::unspecified>,
1>            State=void,
1>            ForwardOp=boost::mpl::arg<1>,
1>
ForwardPredicate=boost::mpl::protect<boost::mpl::aux::find_if_pred<boost::mp
l::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost::is_base_a
nd_derived<SMatrixf,boost::mpl::_>>>>
1>        ]
1>        f:\toolkits\boost_1_36_0\boost\mpl\find_if.hpp(39) : see reference
to class template instantiation
'boost::mpl::iter_fold_if<Sequence,State,ForwardOp,ForwardPredicate>' being
compiled
1>        with
1>        [
1>
Sequence=boost::mpl::vector3<luabind::detail::unspecified,luabind::detail::u
nspecified,luabind::detail::unspecified>,
1>            State=void,
1>            ForwardOp=boost::mpl::arg<1>,
1>
ForwardPredicate=boost::mpl::protect<boost::mpl::aux::find_if_pred<boost::mp
l::and_<luabind::detail::is_not_unspecified<boost::mpl::_1>,boost::is_base_a
nd_derived<SMatrixf,boost::mpl::_>>>>
1>        ]
1>        f:\test\third-party\include\luabind\class.hpp(208) : see reference
to class template instantiation 'boost::mpl::find_if<Sequence,Predicate>'
being compiled
1>        with
1>        [
1>
Sequence=boost::mpl::vector3<luabind::detail::unspecified,luabind::detail::u
nspecified,luabind::detail::unspecified>,
1>
Predicate=boost::mpl::and_<luabind::detail::is_not_unspecified<boost::mpl::_
1>,boost::is_base_and_derived<SMatrixf,boost::mpl::_>>
1>        ]
1>        f:\test\third-party\include\luabind\class.hpp(987) : see reference
to class template instantiation
'luabind::detail::extract_parameter<Parameters,Predicate,DefaultValue>'
being compiled
1>        with
1>        [
1>
Parameters=boost::mpl::vector3<luabind::detail::unspecified,luabind::detail:
:unspecified,luabind::detail::unspecified>,
1>            Predicate=boost::is_base_and_derived<SMatrixf,boost::mpl::_>,
1>            DefaultValue=luabind::detail::null_type
1>        ]
1>        f:\test\cscriptvmlua.cpp(195) : see reference to class template
instantiation 'luabind::class_<T>' being compiled
1>        with
1>        [
1>            T=SMatrixf
1>        ]



----------------------------------------------------------------------
Zobacz program TV na dzis!
sprawdz >>>http://link.interia.pl/f202a


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user