aggregate initializer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The standard C++ syntax does not seem to allow a ctor-initializer to contain an aggregate initializer.

Its probably easier to show you code than describe my problem:

class foo {
public:
    foo(int i);
};

class bar {
private:
	foo f[10];

public:
	bar() : f( NOT ALLOWED ) { }
};

Two questions:

1) Is this true?  (or am I missing something?)

2) Goes g++ have an extension to do this?  (If so, what is the syntax?)

Thank you for your time and trouble,
Perry Smith


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux