mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 18:12:43 +00:00
instantiation hacks for tru64cxx6.5
[SVN r13265]
This commit is contained in:
@@ -169,6 +169,7 @@ class class_ : private objects::class_base
|
||||
std::size_t, size = mpl::size<bases>::value + 1);
|
||||
class_id ids[size];
|
||||
};
|
||||
friend struct id_vector;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,11 @@ struct register_base_of
|
||||
template <class Derived, class Bases>
|
||||
inline void register_class_from_python(Derived* = 0, Bases* = 0)
|
||||
{
|
||||
(void)instance_finder<Derived>::registration;
|
||||
// cause the static registration to be instantiated. Can't just
|
||||
// cast it to void on all compilers; some will skip its
|
||||
// initialization.
|
||||
void const* ignored = &instance_finder<Derived>::registration;
|
||||
(void)ignored;
|
||||
|
||||
// register all up/downcasts here
|
||||
register_dynamic_id<Derived>();
|
||||
|
||||
@@ -160,7 +160,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
// Forward construction to the held object
|
||||
pointer_holder_back_reference(PyObject* p)
|
||||
: m_p(new held_type(p)) {
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
template <class A1>
|
||||
@@ -169,7 +169,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A1>::type&)(a1)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A2>::type&)(a2)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A3>::type&)(a3)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A4>::type&)(a4)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A4>::type&)(a4)
|
||||
, (typename unwrap_reference<A5>::type&)(a5)
|
||||
)) {
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A5>::type&)(a5)
|
||||
, (typename unwrap_reference<A6>::type&)(a6)
|
||||
)) {
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A7>::type&)(a7)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A8>::type&)(a8)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A9>::type&)(a9)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ struct pointer_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A10>::type&)(a10)
|
||||
))
|
||||
{
|
||||
(void)instance_finder<held_type>::registration;
|
||||
void const* x = &instance_finder<held_type>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ struct value_holder_back_reference : instance_holder
|
||||
// Forward construction to the held object
|
||||
value_holder_back_reference(PyObject* p)
|
||||
: m_held() {
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A1>::type&)(a1)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A2>::type&)(a2)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A3>::type&)(a3)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A4>::type&)(a4)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A4>::type&)(a4)
|
||||
, (typename unwrap_reference<A5>::type&)(a5)
|
||||
) {
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A5>::type&)(a5)
|
||||
, (typename unwrap_reference<A6>::type&)(a6)
|
||||
) {
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A7>::type&)(a7)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A8>::type&)(a8)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A9>::type&)(a9)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ struct value_holder_back_reference : instance_holder
|
||||
, (typename unwrap_reference<A10>::type&)(a10)
|
||||
)
|
||||
{
|
||||
(void)instance_finder<BackReferenceType>::registration;
|
||||
void const* x = &instance_finder<BackReferenceType>::registration; (void)x;
|
||||
}
|
||||
|
||||
private: // required holder implementation
|
||||
|
||||
@@ -52,4 +52,4 @@ int main()
|
||||
assert_mf_cast<int, Y>(3);
|
||||
assert_mf_cast<X, Y>(X());
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user