Gennaro Prota <[EMAIL PROTECTED]> writes:
| On 12 Jan 2003 10:49:09 +0100, Gabriel Dos Reis
| <[EMAIL PROTECTED]> wrote:
|
| >I believe that that sentence may have been in the first printings of
| >TC++PL3 [at the time, I got the third printing, which someone managed
| >to steel :-(]
|
| Here ar
On 12 Jan 2003 10:49:09 +0100, Gabriel Dos Reis
<[EMAIL PROTECTED]> wrote:
>I believe that that sentence may have been in the first printings of
>TC++PL3 [at the time, I got the third printing, which someone managed
>to steel :-(]
Here are his words:
http://groups.google.com/groups?selm=F439u3.G
On Sat, 11 Jan 2003 18:26:54 -0800, "Paul Mensonides"
<[EMAIL PROTECTED]> wrote:
>Yeah. However, this doesn't really apply to what I'm talking about with:
>
>enum { a, b, c };
>
>Yes, for linkage purposes 'enum xyz { }' is equivalent to 'typedef enum { }
>xyz'.
Well, is the enum below unnamed?
Terje Slettebø <[EMAIL PROTECTED]> writes:
| >From: "Gabriel Dos Reis" <[EMAIL PROTECTED]>
|
| > What I find confusing about the current rule is that it makes an
| > exception for integral type const static data member. I think the old
| > rule was less irregular.
| >
| > (Strangely enought, for
>From: "Gabriel Dos Reis" <[EMAIL PROTECTED]>
> What I find confusing about the current rule is that it makes an
> exception for integral type const static data member. I think the old
> rule was less irregular.
>
> (Strangely enought, for long time -- since the publication of TC++PL3
> in 1997 -
- Original Message -
From: "Gennaro Prota" <[EMAIL PROTECTED]>
> >Incidently, an unnamed type has no linkage.
>
> I think the issue is a little more subtle in that a) it's names that
> have or don't have linkage, not types b) a typedef allows you to give
> a name, for linkage purposes, to
On Sat, 11 Jan 2003 12:32:16 -0800, "Paul Mensonides"
<[EMAIL PROTECTED]> wrote:
>> 14.3.1/2 [quote--
>>
>> A local type, a type with no linkage, an unnamed type or a type compounded
>> from any of these types shall not be used as a template-argument for a
>> template type-parameter.
>>
>> --end q
Gennaro Prota <[EMAIL PROTECTED]> writes:
| On 09 Jan 2003 18:02:51 +0100, Gabriel Dos Reis
| <[EMAIL PROTECTED]> wrote:
|
| >So you propose that the presence/absence of an initializer turns an
| >expression designating a static data member into an rvalue or lvalue?
| >
| >I can't speak for the c
> You would have to have more than one "map_integral" with a different value
> name, where the values are dependent on one another and are part of the
> public interface. It isn't a complete solution, but it does work in most
> cases.
For future metaprogramming work (or intermediate values), it m
Terje Slettebø <[EMAIL PROTECTED]> writes:
>>From: "David Abrahams" <[EMAIL PROTECTED]>
>
>> Terje Slettebø <[EMAIL PROTECTED]> writes:
>>
>> > And since there are techniques for making out-of-class definitions
> easier
>> > (and automatic), which may be instantiated if needed, like you showed,
>
- Original Message -
From: "Terje Slettebø" <[EMAIL PROTECTED]>
> > And since there are techniques for making out-of-class definitions
easier
> > (and automatic), which may be instantiated if needed, like you showed,
then
> > static const seems clearly best.
>
> That's not nearly so easy t
On 09 Jan 2003 18:02:51 +0100, Gabriel Dos Reis
<[EMAIL PROTECTED]> wrote:
>So you propose that the presence/absence of an initializer turns an
>expression designating a static data member into an rvalue or lvalue?
>
>I can't speak for the committee. Personnally, I do know that that
>proposal won
>From: "David Abrahams" <[EMAIL PROTECTED]>
> Terje Slettebø <[EMAIL PROTECTED]> writes:
>
> > And since there are techniques for making out-of-class definitions
easier
> > (and automatic), which may be instantiated if needed, like you showed,
then
> > static const seems clearly best.
>
> That's n
Gennaro Prota <[EMAIL PROTECTED]> writes:
| On 09 Jan 2003 15:29:30 +0100, Gabriel Dos Reis
| <[EMAIL PROTECTED]> wrote:
|
| >I'm a long term pro-enum (mostly because for the meta programming
| >stuff I had to do, it works very well), but I do understand the
| >potential drawbacks raised by the p
On 09 Jan 2003 15:29:30 +0100, Gabriel Dos Reis
<[EMAIL PROTECTED]> wrote:
>I'm a long term pro-enum (mostly because for the meta programming
>stuff I had to do, it works very well), but I do understand the
>potential drawbacks raised by the pro-'static const' camp.
Ok. Now for the most stupid qu
- Original Message -
From: "Paul Mensonides" <[EMAIL PROTECTED]>
> Actually, this seems to be a bug in Comeau C++:
>
> #include
> #include
>
> struct A {
> enum type { x, y };
> };
>
> template struct B { };
>
> template inline T operator+(T lhs, T rhs) {
> throw 0;
> }
>
>
Terje Slettebø <[EMAIL PROTECTED]> writes:
>>From: "Paul Mensonides" <[EMAIL PROTECTED]>
>>
>> > Just my 2 cents.
>>
>> Make that 3 cents...
>>
>> In summary, enumerations are distinct types and therefore can interfere
> with
>> the rest of the language. Particularly, constant expressions,
> over
>From: "Gennaro Prota" <[EMAIL PROTECTED]>
> On Wed, 8 Jan 2003 01:23:05 +0100, Terje Slettebø
> <[EMAIL PROTECTED]> wrote:
>
> >>From: "Gennaro Prota" <[EMAIL PROTECTED]>
>
> >> It *may* need out-of-class definition, as you say.
> >
> >Actually, it's pretty clear that in this case, the out-of-cla
On Wed, 8 Jan 2003 01:23:05 +0100, Terje Slettebø
<[EMAIL PROTECTED]> wrote:
>>From: "Gennaro Prota" <[EMAIL PROTECTED]>
>> It *may* need out-of-class definition, as you say.
>
>Actually, it's pretty clear that in this case, the out-of-class definition
>is required.
Indeed.
> Intel C++ 7.0, run
>From: "Paul Mensonides" <[EMAIL PROTECTED]>
>
> > Just my 2 cents.
>
> Make that 3 cents...
>
> In summary, enumerations are distinct types and therefore can interfere
with
> the rest of the language. Particularly, constant expressions,
overloading,
> operator overloading, template type deduction
>From: "Gennaro Prota" <[EMAIL PROTECTED]>
> On Tue, 7 Jan 2003 15:35:56 +0100, Terje Slettebø
> <[EMAIL PROTECTED]> wrote:
>
> [...]
> >I like static const, as I think it conveys more succinctly what it's
about,
> >and the enum appears more like a hack (for compilers not handling static
> >const
- Original Message -
From: "Paul Mensonides" <[EMAIL PROTECTED]>
> Just my 2 cents.
Make that 3 cents...
In summary, enumerations are distinct types and therefore can interfere with
the rest of the language. Particularly, constant expressions, overloading,
operator overloading, template
- Original Message -
From: "Gennaro Prota" <[EMAIL PROTECTED]>
[...]
>I like static const, as I think it conveys more succinctly what it's about,
>and the enum appears more like a hack (for compilers not handling static
>const in-class initialisation). However, if this means it may need an
On Tue, 7 Jan 2003 15:35:56 +0100, Terje Slettebø
<[EMAIL PROTECTED]> wrote:
[...]
>I like static const, as I think it conveys more succinctly what it's about,
>and the enum appears more like a hack (for compilers not handling static
>const in-class initialisation). However, if this means it may n
>From: "David B. Held" <[EMAIL PROTECTED]>
> "Terje Slettebø" <[EMAIL PROTECTED]> wrote in message
> 023f01c2b65a$1758e990$cb6c6f50@pc">news:023f01c2b65a$1758e990$cb6c6f50@pc...
> > [...]
> > Thus, it prefers static const, if it's possible to initialise it
in-class,
> > on the given compiler, as a
"Terje Slettebø" <[EMAIL PROTECTED]> wrote in message
023f01c2b65a$1758e990$cb6c6f50@pc">news:023f01c2b65a$1758e990$cb6c6f50@pc...
> [...]
> Thus, it prefers static const, if it's possible to initialise it in-class,
> on the given compiler, as allowed in the standard. However,
> "C++ Templates: The
26 matches
Mail list logo