Re: in-class initialization of fundamental types
Re: in-class initialization of fundamental types
- Subject: Re: in-class initialization of fundamental types
- From: Clark Cox <email@hidden>
- Date: Sat, 24 Sep 2005 02:26:25 -0400
Your problem is elsewhere, as gcc 4, on my mac has no problem compiling that:
[littleclark2:~] clarkcox% cat temp.cpp
#include <iostream>
class foo
{
public:
static const int foo_max_size = 100;
private:
char fooname[foo_max_size];
};
int main()
{
foo f;
std::cout << (sizeof f) << std::endl;
return 0;
}
[littleclark2:~] clarkcox% g++-4.0 temp.cpp
[littleclark2:~] clarkcox% ./a.out
100
[littleclark2:~] clarkcox%
2005/9/23, Markian Hlynka <email@hidden>:
> Isn't the following suppposed to be legal in c++?
>
> class foo
> {
> public:
> static const int foo_max_size = 100;
>
> private:
> char fooname[foo_max_size];
> };
>
> xcode (and thus gcc4) doesn't seem to allow it, but I was certain I'd
> read somewhere that this was now legal??
>
> Markian
>
> ----
> Quantum mechanics -- the dreams that stuff is made of.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Clark S. Cox III
email@hidden
http://clarkcox3.livejournal.com/
http://homepage.mac.com/clarkcox3/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden