Arguments out of order error
Hi all,
With Sun Studio 10 we get "arguments out of order error" which we don't get with any other comiler or Sun Studio 11. The error is as below:
"/build/builds/bczar/Studio/ACE_wrappers/TAO/tao/BD_String_Argument_T.inl", line
14: Error: Arguments out of order for TAO::In_BD_String_Argument_T<S_var, BOUND
, Insert_Policy><struct>>;
The template definition is:
template<typename S_var,
size_t BOUND,
template ><typename> class Insert_Policy>
class In_BD_String_SArgument_T : public InArgument
{
public:
In_BD_String_SArgument_T (void);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
#if TAO_HAS_INTERCEPTORS == 1
virtual void interceptor_value (CORBA::Any *any) const;
#endif /* TAO_HAS_INTERCEPTORS == 1 */
const typename S_var::s_traits::char_type * arg (void) const;
private:
S_var x_;
};
The template method itself is:
template<typename S_var,
size_t BOUND,
template ><typename> class Insert_Policy>
ACE_INLINE
TAO::In_BD_String_SArgument_T<S_var,BOUND,Insert_Policy>::
In_BD_String_SArgument_T (void)
{}
Any one ideas? We can deliver a preprocessor output of the code if needed.
# 1
That sounds like a bug in Studio 10 that apparently was fixed in Studio 11. Can you use Studio 11 instead?
If you must use Studio 10, have you upgraded to all the latest patches? You can get them here:
http://developers.sun.com/prodtech/cc/downloads/patches/index.jsp
If getting the latest paches doesn't fix the problem, you can file a bug report.
You would need to provide a test case that demonstrates the problem. Maybe you can strip down your code to something simple.
If you have a service contract with Sun, contact your Sun Service representative. You will be able to track progress on fixing the bug, and get a pre-release version of the patch.
If you don't have a service contract, you can post the test case here if it is not too big, or you can file a bug report via bugs.sun.com. Information on how to do that was posted here:
http://forum.sun.com/jive/thread.jspa?threadID=99337
# 5
Is there a way that I can send you or another sun engineer the preprocessor output, that really should be enough to tacke this. It is 976 Kb of size. The code that the error is given about is:
template < typename S_var ,
size_t BOUND ,
template < typename > class Insert_Policy >
class In_BD_String_Argument_T : public InArgument
{
public :
In_BD_String_Argument_T ( const typename S_var :: s_traits :: char_type * x ) ;
virtual CORBA :: Boolean marshal ( TAO_OutputCDR & cdr ) ;
virtual void interceptor_value ( CORBA :: Any * any ) const ;
typename S_var :: s_traits :: char_type const * arg ( void ) const ;
private :
typename S_var :: s_traits :: char_type const * x_ ;
} ;
template < typename S_var ,
size_t BOUND ,
template < typename > class Insert_Policy >
TAO :: In_BD_String_Argument_T < S_var , BOUND , Insert_Policy > :: In_BD_String_Argument_T (
const typename S_var :: s_traits :: char_type * x
)
: x_ ( x )
{ }