[aspectc-user] Namespace - Member name clash

Arndt Muehlenfeld amuehlen at ist.tugraz.at
Thu Sep 15 14:43:30 CEST 2005


I started using Aspect-C++ recently and like it very much.

Today I tried to compile a project that uses log4cplus
with ag++ 0.9.3 and got an error message in one of its headers.

I isolated the cause and produced a small example:
(No aspect defined so far)

#include <vector>

// Forward Declarations
namespace pattern {
    class PatternConverter;

class VectorWrapper{
    int pattern;
    std::vector<pattern::PatternConverter*> contents_;

At the definition of the member variable "contents_"
ag++ issues the error:

-r repo.acp -p .. -c ../VectorWrapper.cpp
../VectorWrapper.h:18: error: invalid member declaration near token `<'
error: Execution failed: 
--config "puma.config"  -rrepo.acp -p".." -c "../VectorWrapper.cpp" -o 

(here the version coming with acdt was used for convenience,
 but using version 0.9.3 makes no difference)

I suppose the error results from pattern being a member variable
and a namespace at the same time.

g++ doesn't complain about this code, I suppose it's ANSI compliant.

Is it a bug in Aspect-C++ or in log4cplus?

Thanks in advance,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: amuehlen.vcf
Type: text/x-vcard
Size: 331 bytes
Desc: not available
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20050915/1d330111/attachment.vcf>

More information about the aspectc-user mailing list