summaryrefslogtreecommitdiff
path: root/TAO/tao/Array_VarOut_T.inl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Array_VarOut_T.inl')
-rw-r--r--TAO/tao/Array_VarOut_T.inl23
1 files changed, 3 insertions, 20 deletions
diff --git a/TAO/tao/Array_VarOut_T.inl b/TAO/tao/Array_VarOut_T.inl
index 13c9f923572..f0837b64e71 100644
--- a/TAO/tao/Array_VarOut_T.inl
+++ b/TAO/tao/Array_VarOut_T.inl
@@ -2,8 +2,6 @@
//
//$Id$
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
template<typename T, typename T_slice, typename TAG>
ACE_INLINE
TAO_Array_Var_Base_T<T,T_slice,TAG>::TAO_Array_Var_Base_T (void)
@@ -245,7 +243,7 @@ template<typename T, typename T_slice, typename TAG>
ACE_INLINE
TAO_Array_Forany_T<T,T_slice,TAG>::TAO_Array_Forany_T (void)
: ptr_ (0),
- nocopy_ (false)
+ nocopy_ (0)
{}
template<typename T, typename T_slice, typename TAG>
@@ -349,7 +347,7 @@ TAO_Array_Forany_T<T,T_slice,TAG>::in (void) const
{
// @@@ (JP) This looks scary I know but it helps MSVC understand
// things better when the array is multi-dimensional.
-#if (defined (_MSC_VER) && _MSC_VER <= 1200)
+#if (defined (_MSC_VER) && _MSC_VER <= 1200) || (defined (__IBMCPP__) && (__IBMCPP__ <= 600))
// @@ (OO) MSVC++ 6 can't handle the const_cast<> in the
// multi-dimensional array case so reinterpret_cast<> cast
// instead. It's not clear if this is really the right
@@ -358,22 +356,9 @@ TAO_Array_Forany_T<T,T_slice,TAG>::in (void) const
// C-style "sledgehammer" cast to make it obvious that this
// code may have unresolved issues, and also to make it
// easier for others to find this code.
- // @@ (RLS) It is not the const_cast<> that VC6 can't handle, it is
- // just confused. The ptr_ is seen as int (* const) and
- // the desired type is const int *. const_cast<> is used
- // to cast away const'ness and it does on VC6, yeilding
- // int * where const int * is desired, and specifically
- // directing the user to use either a reinterpret_cast<>
- // or a C-style cast.
- // @@ (RLS) The IBM compiler was complaining about a bad cast only.
- // return const_cast<const T_slice *> (this->ptr_);
- // It is perfectly happy with the #else part below, as
- // is every other compiler I've tried it on.
return reinterpret_cast<const T_slice *> (this->ptr_);
#else
- // This should work on all platforms. If a platform fails that it is
- // that compiler that's wrong, not everyone else. RLS
- return (this->ptr_);
+ return const_cast<const T_slice *> (this->ptr_);
#endif /* _MSC_VER <= 1200 */
}
@@ -424,5 +409,3 @@ TAO_Array_Forany_T<T,T_slice,TAG>::tao_alloc (void)
{
return TAO::Array_Traits<T,T_slice,TAG>::alloc ();
}
-
-TAO_END_VERSIONED_NAMESPACE_DECL