*** include/omniORB3/CORBA_sysdep.h	Tue Jun 27 16:23:24 2000
--- cxx56include/omniORB3/CORBA_sysdep.h	Thu Jun 29 12:34:15 2000
***************
*** 242,247 ****
--- 242,270 ----
  #     define OMNI_PREMATURE_INSTANTIATION
  //    Extra macros from the Compaq C++ 5.x patch (in <top>/patches/) to be
  //    added here
+ #define OMNI_OPERATOR_REFPTR(T)\
+   typedef T*& _1RTP_##T;\
+   inline operator _1RTP_##T()
+ 
+ //  This platform can't handle:
+ //
+ //  template <class T>
+ //  struct X {
+ //    T t;              // (1)
+ //  };
+ //  struct Y {
+ //    typedef X<Y> Z;   // (2)
+ //  };
+ //
+ //  because X<Y> is instantiated at (2) so that T is an incomplete type at (1).
+ 
+ #define OMNI_CONSTRTYPE_FIX_VAR_MEMBER(T)
+ #define OMNI_CONSTRTYPE_FIX_VAR(T) typedef _CORBA_ConstrType_Fix_Var<T> T##_var;
+ 
+ //  Note that this is only a problem with fixed length constructed types.  The
+ //  variable length constructed type var uses a pointer, so the forward
+ //  declaration is okay.
+ 
  #     ifndef OMNI_OPERATOR_REFPTR
  #       error "Patch for Compaq C++ 5.x has not been applied."
  #     endif
*** include/omniORB3/CORBA.h	Tue Jun 27 16:15:07 2000
--- cxx56include/omniORB3/CORBA.h	Thu Jun 29 12:51:16 2000
***************
*** 717,723 ****
      }
      inline Any_OUT_arg& operator=(Any* p) { _data = p; return *this; }
  
!     operator Any*& () { return _data; }
      Any*& ptr() { return _data; }
  
      Any*& _data;
--- 717,723 ----
      }
      inline Any_OUT_arg& operator=(Any* p) { _data = p; return *this; }
  
!     OMNI_OPERATOR_REFPTR(Any) { return _data; }
      Any*& ptr() { return _data; }
  
      Any*& _data;
***************
*** 2310,2316 ****
  	_data = s._data; return *this;
        }
        inline ObjectIdList_out& operator=(T* s) { _data = s; return *this; }
!       inline operator T*&() { return _data; }
        inline T*& ptr() { return _data; }
        inline T* operator->() { return _data; }
        inline _CORBA_String_element operator [] (_CORBA_ULong i) {
--- 2310,2316 ----
  	_data = s._data; return *this;
        }
        inline ObjectIdList_out& operator=(T* s) { _data = s; return *this; }
!       OMNI_OPERATOR_REFPTR(T) { return _data; }
        inline T*& ptr() { return _data; }
        inline T* operator->() { return _data; }
        inline _CORBA_String_element operator [] (_CORBA_ULong i) {
*** src/lib/omniORB2/dynamic/pseudo.h	Wed Sep 22 14:26:36 1999
--- cxx56src/lib/omniORB2/dynamic/pseudo.h	Thu Jun 29 14:06:23 2000
***************
*** 145,151 ****
--- 145,155 ----
    virtual CORBA::Boolean NP_is_nil() const;
    virtual CORBA::ContextList_ptr NP_duplicate();
  
+ #if !defined(__DECCXX) || __DECCXX_VER >= 60000000
    inline const char*const* NP_list() { return pd_list.NP_data(); }
+ #else
+   inline const char*const* NP_list() { return (const char*const*)pd_list.NP_data(); }
+ #endif
  
  private:
    void free_entries();
*** include/omniORB3/stringtypes.h	Tue Jun 27 16:15:08 2000
--- cxx56include/omniORB3/stringtypes.h	Thu Jun 29 12:46:41 2000
***************
*** 488,494 ****
    }
    inline ~_CORBA_String_inout() {}
  
!   inline operator char*&()  { return _data; }
  
    char*& _data;
  
--- 488,494 ----
    }
    inline ~_CORBA_String_inout() {}
  
!   OMNI_OPERATOR_REFPTR(char)  { return _data; }
  
    char*& _data;
  
***************
*** 517,524 ****
    inline _CORBA_String_out& operator=(const char* p) {
      _data = ((p) ? _CORBA_String_var::string_dup(p) : 0); return *this;
    }
! 
!   operator char*& () { return _data; }
    char*& ptr()       { return _data; }
  
    char*& _data;
--- 517,523 ----
    inline _CORBA_String_out& operator=(const char* p) {
      _data = ((p) ? _CORBA_String_var::string_dup(p) : 0); return *this;
    }
!   OMNI_OPERATOR_REFPTR(char) { return _data; }
    char*& ptr()       { return _data; }
  
    char*& _data;
*** include/omniORB3/poa.h	Tue Jun 27 16:15:08 2000
--- cxx56include/omniORB3/poa.h	Thu Jun 29 12:46:41 2000
***************
*** 260,266 ****
      inline ObjectId_out(const ObjectId_out& s) : _data(s._data) { }
      inline ObjectId_out& operator=(const ObjectId_out& s) { _data = s._data; return *this; }
      inline ObjectId_out& operator=(_T* s) { _data = s; return *this; }
!     inline operator _T*&() { return _data; }
      inline _T*& ptr() { return _data; }
      inline _T* operator->() { return _data; }
      inline CORBA::Octet& operator [] (_CORBA_ULong i) {   return (*_data)[i]; }
--- 260,266 ----
      inline ObjectId_out(const ObjectId_out& s) : _data(s._data) { }
      inline ObjectId_out& operator=(const ObjectId_out& s) { _data = s._data; return *this; }
      inline ObjectId_out& operator=(_T* s) { _data = s; return *this; }
!     OMNI_OPERATOR_REFPTR(_T) { return _data; }
      inline _T*& ptr() { return _data; }
      inline _T* operator->() { return _data; }
      inline CORBA::Octet& operator [] (_CORBA_ULong i) {   return (*_data)[i]; }
*** include/omniORB3/templateDecls.h	Tue Jun 27 16:15:09 2000
--- cxx56include/omniORB3/templateDecls.h	Thu Jun 29 12:46:42 2000
***************
*** 682,688 ****
    }
    inline ~_CORBA_ObjRef_INOUT_arg() {}
  
!   inline operator T*&()  { return _data; }
  
    T*& _data;
  
--- 682,688 ----
    }
    inline ~_CORBA_ObjRef_INOUT_arg() {}
  
!   OMNI_OPERATOR_REFPTR(T)  { return _data; }
  
    T*& _data;
  
***************
*** 719,725 ****
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
  
!   inline operator T*&()  { return _data; }
    inline T*& ptr()       { return _data; }
    inline T* operator->() const { return _data; }
  
--- 719,725 ----
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
  
!   OMNI_OPERATOR_REFPTR(T)  { return _data; }
    inline T*& ptr()       { return _data; }
    inline T* operator->() const { return _data; }
  
***************
*** 840,846 ****
    inline _CORBA_ConstrType_Fix_OUT_arg(const T_out& p) : _data(p._data) {}
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
!   inline operator T*&() { return _data; }
    inline T*& ptr() { return _data; }
    inline T*& operator->() { return _data; }
  
--- 840,846 ----
    inline _CORBA_ConstrType_Fix_OUT_arg(const T_out& p) : _data(p._data) {}
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
!   OMNI_OPERATOR_REFPTR(T) { return _data; }
    inline T*& ptr() { return _data; }
    inline T*& operator->() { return _data; }
  
***************
*** 943,949 ****
    inline _CORBA_ConstrType_Variable_OUT_arg(const T_out& p) : _data(p._data) {}
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
!   inline operator T*&() { return _data; }
    inline T*& ptr() { return _data; }
    inline T*& operator->() { return _data; }
  
--- 943,949 ----
    inline _CORBA_ConstrType_Variable_OUT_arg(const T_out& p) : _data(p._data) {}
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
!   OMNI_OPERATOR_REFPTR(T) { return _data; }
    inline T*& ptr() { return _data; }
    inline T*& operator->() { return _data; }
  
***************
*** 1044,1050 ****
    inline _CORBA_Array_OUT_arg(const T_out& p) : _data(p._data) {}
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
!   inline operator T*&() { return _data; }
    inline T*& ptr() { return _data; }
    inline T& operator[] (_CORBA_ULong index) {
      return _data[index];
--- 1044,1050 ----
    inline _CORBA_Array_OUT_arg(const T_out& p) : _data(p._data) {}
    inline T_out& operator=(const T_out& p) { _data = p._data; return *this; }
    inline T_out& operator=(T* p) { _data = p; return *this; }
!   OMNI_OPERATOR_REFPTR(T) { return _data; }
    inline T*& ptr() { return _data; }
    inline T& operator[] (_CORBA_ULong index) {
      return _data[index];
*** src/lib/omniORB2/omniidl_be/cxx/header/template.py	Mon Jun 26 16:24:00 2000
--- cxx56src/lib/omniORB2/omniidl_be/cxx/header/template.py	Thu Jun 29 14:18:30 2000
***************
*** 622,628 ****
      _data = s;
      return *this;
    }
!   inline operator T*&()  { return _data; }
    inline T*& ptr()       { return _data; }
    inline T* operator->() { return _data; }
  
--- 622,628 ----
      _data = s;
      return *this;
    }
!   OMNI_OPERATOR_REFPTR(T)  { return _data; }
    inline T*& ptr()       { return _data; }
    inline T* operator->() { return _data; }
  
***************
*** 656,661 ****
--- 656,682 ----
  };
  
  typedef @name@::_var_type @name@_var;
+ 
+ typedef _CORBA_ConstrType_@type@_OUT_arg< @name@,@name@_var > @name@_out;
+ """
+ 
+ # Added for DEC C++ 5.6:
+ struct_fix = """\
+ struct @name@ {
+   OMNI_CONSTRTYPE_FIX_VAR_MEMBER(@name@)
+ 
+   @Other_IDL@
+ 
+   @members@
+ 
+   size_t _NP_alignedSize(size_t initialoffset) const;
+   void operator>>= (NetBufferedStream &) const;
+   void operator<<= (NetBufferedStream &);
+   void operator>>= (MemBufferedStream &) const;
+   void operator<<= (MemBufferedStream &);
+ };
+ 
+ OMNI_CONSTRTYPE_FIX_VAR(@name@)
  
  typedef _CORBA_ConstrType_@type@_OUT_arg< @name@,@name@_var > @name@_out;
  """
*** src/lib/omniORB2/omniidl_be/cxx/header/defs.py	Tue Jun 27 16:15:10 2000
--- cxx56src/lib/omniORB2/omniidl_be/cxx/header/defs.py	Thu Jun 29 14:18:31 2000
***************
*** 886,897 ****
                                 dims = tyutil.dimsToString(decl_dims))
              
      # Output the structure itself
!     stream.out(template.struct,
!                name = cxx_name,
!                type = type,
!                Other_IDL = Other_IDL,
!                members = members)
!     
      self.__insideClass = insideClass
  
      # TypeCode and Any
--- 886,903 ----
                                 dims = tyutil.dimsToString(decl_dims))
              
      # Output the structure itself
!     if type == "Fix":
!         stream.out(template.struct_fix,
!                    name = cxx_name,
!                    type = type,
!                    Other_IDL = Other_IDL,
!                    members = members)
!     else:
!         stream.out(template.struct,
!                    name = cxx_name,
!                    type = type,
!                    Other_IDL = Other_IDL,
!                    members = members)
      self.__insideClass = insideClass
  
      # TypeCode and Any
*** src/lib/omniORB2/omniidl_be/cxx/dynskel/main.py Tue Jun 27 17:15:09 2000
--- cxx56src/lib/omniORB2/omniidl_be/cxx/dynskel/main.py Thu Jul  6 12:47:32 2000
***************
*** 651,657 ****
                      d_name
              if is_array:
                  thing = docast(memberType, d, thing)
! 
              assertDefined([ prefix + "_buildDesc" + d_cname ])
              cases.out("""\
  case @n@:
--- 651,658 ----
                      d_name
              if is_array:
                  thing = docast(memberType, d, thing)
!             elif memberType.deref().objref():
!                 thing = memberType.objRefTemplate("tcDesc_arg") + "(" + thing + ")"
              assertDefined([ prefix + "_buildDesc" + d_cname ])
              cases.out("""\
  case @n@:
