From -7000813537416771974
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,55e8373857946bb6
X-Google-Attributes: gidf78e5,public
From: James Kanze <james-albert.kanze@vx.cit.alcatel.fr>
Subject: Re: preprocessor example
Date: 1997/03/05
Message-ID: <rf5iv36u150.fsf@vx.cit.alcatel.fr>#1/1
X-Deja-AN: 223281801
References: <199703031925.WAA04822@such.srcc.msu.su>
X-Original-Date: 05 Mar 1997 10:41:15 +0100
Organization: -
X-Auth: PGPMoose V1.1 PGP comp.std.c++
Newsgroups: comp.std.c++


Alexander Krotoff <krotoff@such.srcc.msu.su> writes:

|>  This is about 2nd CD section 16.3.5 [cpp.scope] pagraph 6.
|>  
|>  In the exaple symbol `@' is used. As far as I see
|>  this symbol do not form any preprocessing token and
|>  even cannot be used in the preprocessing token.
|>  
|>  Is this example incorrect ?

Not at all.  "@" is a valid preprocessing token; under 2.4, one of the
valid forms of a preprocessing token is: "each non-white-space character
that cannot be one of the above".  "@" qualifies under this rule.

Of course, if the '@' gets through the preprocessing, there will be no
way to convert it into a valid token.  However, it can still be legally
used in the preprocessor, either as (part of) an argument to # (as in
the example), or in building a file name, e.g.:

    #define FUNNY_FILE_NAME < ## @ ## .h ## >
    #include FUNNY_FILE_NAME

-- 
James Kanze      home:     kanze@gabi-soft.fr        +33 (0)1 39 55 85 62
                 office:   kanze@vx.cit.alcatel.fr   +33 (0)1 69 63 14 54
GABI Software, Sarl., 22 rue Jacques-Lemercier, F-78000 Versailles France
	    -- Conseils en informatique industrielle --
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]



