This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using incomplete types to instantiate STL-Templates?


"Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de> writes:


[...]

| * For the standard library there is this restriction in 17.3.4.6[2]:
| 
| 	In particular, the effects are undefined in the following cases:
| 	[ ... ]
| 	-- if an incomplete type (3.9) is used as a template argument
| 	   when instantiating a template component.
| 
| I'm not sure if the second point is really relevant. Mostly because
| I'm not entirely sure what a template component is supposed to be.

The text you cited is relevant:  The component in question in this
particular configuration is std::list<>.

This is the kind of thing that really depends on implementation details.
It would be nice if Foo were accepted but that do put severe
restrictions on the implementation.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]