summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2004-06-12 05:14:17 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2004-06-12 05:14:17 +0000
commitc846bcbd8573653ca4a4d3f8550b03e6c5632cc0 (patch)
tree7299d17e2a0057b3fc7b44703da1b5709ef9e017 /TAO/tao
parent3cd22160b24cb9e5c8d08d45d7f7052b6fb608dd (diff)
downloadATCD-c846bcbd8573653ca4a4d3f8550b03e6c5632cc0.tar.gz
ChangeLogTag:Fri Jun 11 22:11:38 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/Array_VarOut_T.inl13
-rw-r--r--TAO/tao/Fixed_Array_Argument_T.inl17
2 files changed, 28 insertions, 2 deletions
diff --git a/TAO/tao/Array_VarOut_T.inl b/TAO/tao/Array_VarOut_T.inl
index b933387ed50..dca8390f8d1 100644
--- a/TAO/tao/Array_VarOut_T.inl
+++ b/TAO/tao/Array_VarOut_T.inl
@@ -1,6 +1,7 @@
// -*- C++ -*-
//
//$Id$
+
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)
@@ -291,7 +292,19 @@ const T_slice &
TAO_Array_Forany_T<T,T_slice,TAG>::operator[] (CORBA::ULong index) const
{
#if defined (ACE_HAS_BROKEN_IMPLICIT_CONST_CAST)
+# if defined (_MSC_VER) && _MSC_VER <= 1200
+ // @@ (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
+ // thing to do but the code won't compile with MSVC++ 6
+ // without it. We use a reinterpret_cast<> instead of a
+ // 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.
+ return reinterpret_cast<const T_slice &> (this->ptr_[index]);
+# else
return const_cast<const T_slice &> (this->ptr_[index]);
+# endif /* _MSC_VER <= 1200 */
#else
const T_slice & tmp = this->ptr_[index];
return tmp;
diff --git a/TAO/tao/Fixed_Array_Argument_T.inl b/TAO/tao/Fixed_Array_Argument_T.inl
index d33c0c3ce7b..0c6947bdbe1 100644
--- a/TAO/tao/Fixed_Array_Argument_T.inl
+++ b/TAO/tao/Fixed_Array_Argument_T.inl
@@ -6,8 +6,21 @@ template<typename S, typename S_slice, typename S_forany>
ACE_INLINE
TAO::In_Fixed_Array_Argument_T<S,S_slice,S_forany>::
In_Fixed_Array_Argument_T (const S_slice * x)
- : x_ (const_cast<S_slice *> (x))
-{}
+ : x_ (
+#if defined (_MSC_VER) && _MSC_VER <= 1200
+ // @@ (OO) MSVC++ 6 can't handle the const_cast<> in the
+ // multi-dimensional array case so C-style
+ // "sledgehammer" cast instead (reinterpret_cast<>
+ // doesn't work either). It's not clear if this is
+ // really the right thing to do but the code won't
+ // compile with MSVC++ 6 without it.
+ (S_slice *) x
+#else
+ const_cast<S_slice *> (x)
+#endif /* _MSC_VER <= 1200 */
+ )
+{
+}
template<typename S, typename S_slice, typename S_forany>
ACE_INLINE