[aspectc-user] Re: Multiply Defined Operator in 0.9.1
Matthias Urban
matthias.urban at pure-systems.com
Mon Mar 14 00:45:44 CET 2005
Hi,
Gary Duzan wrote:
> Using a fresh download of 0.9.1 for Linux, I tried running some
> existing code through ag++ as a sanity test and came up with a bunch of
> "operator >>= already defined" errors:
> ...
> and the code in SecurityC.h looks like:
>
> ===========================================================================
> 1859 TAO_Security_Export CORBA::Boolean operator>>= (const CORBA::Any &, Security::Opaque *&); // deprecated
> 1860 TAO_Security_Export CORBA::Boolean operator>>= (const CORBA::Any &, const Security::Opaque *&);
> 1861
> 1862 // TAO_IDL - Generated from
> 1863 // be/be_visitor_structure/any_op_ch.cpp:52
> 1864
> 1865 TAO_Security_Export void operator<<= (CORBA::Any &, const Security::ExtensibleFamily &); // copying version
> 1866 TAO_Security_Export void operator<<= (CORBA::Any &, Security::ExtensibleFamily*); // noncopying version
> 1867 TAO_Security_Export CORBA::Boolean operator>>= (const CORBA::Any &, Security::ExtensibleFamily *&); // deprecated
> ===========================================================================
>
> Any ideas why this is happening?
The AspectC++ parser does not yet instantiate templates per default.
Because Security::Opaque (see above) is a template instance, the parser
can not safely distinguish the declarations of the "operator>>="
functions, and thus fails to parse it. But you may try to rerun the ag++
call using the --real_instances command line option causing the
AspectC++ parser to instantiate templates. Since template parsing is
still in the testing phase, I can not promise that it works.
Hope this helps,
Matthias
--
Matthias Urban Phone: +49-391-544569-32
pure-systems GmbH Fax: +49-391-544569-90
More information about the aspectc-user
mailing list