[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-cxx-dev
Subject:    Re: CXX-DEV: aCC 03.52 compile error....
From:       Amitav Mishra <amitavm () india ! hp ! com>
Date:       2004-03-25 4:59:53
Message-ID: Pine.LNX.4.44.0403251003460.934-100000 () eb9883 ! india ! hp ! com
[Download RAW message or body]

For some reason, aCC is unable to figure out that Box2<Real> is coming from
the Wml namespace.

There are two possible workarounds.

1. Enclose the definitions of the ContAlignedBox and ContOrientedBox in the
namespace, instead of using the "using" declaration:

  // using namespace Wml;
  namespace Wml {
  // Your definitions of ContAlignedBox() and ContOrientedBox().
  }

2. Explicitly qualify Box2<>, instead of using the "using" declaration:

  // using namespace Wml;
  template <class Real>
  Wml::Box2<Real> Wml::ContOrientedBox (int iQuantity)
  {
     // ...
  }

This is of course a bug in aCC.  Please file a bug report.

-amitav

On Wed, 24 Mar 2004, Andrew Cunningham wrote:

> Hi gurus,
> The following source does not compile under aCC 03.52
> ( of course it compiles under gcc)
> 
> Commenting out the declaration and implementation of ContAlignedBox<>
> allows it to compile(!)
> 
> aCC -c test.cpp
> 
> Error 419: "test2.cpp", line 36 # 'Box2' is used as a type, but has not
> been defined as a type.
>       Box2<Real> Wml::ContOrientedBox (int iQuantity)
>       ^^^^
> Error 318: "test2.cpp", line 36 # A template name was expected instead
> of '<type inserted by compiler>'. Did you forget to define the
> template?
>       Box2<Real> Wml::ContOrientedBox (int iQuantity)
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE cxx-dev
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic