[cfe-dev] c++ templates
Doug Gregor
doug.gregor at gmail.com
Sat Nov 15 19:15:09 PST 2008
On Sat, Nov 15, 2008 at 11:50 AM, Sebastian Redl
<sebastian.redl at getdesigned.at> wrote:
> Andrew Sutton wrote:
>>
>> Attached is a very (VERY) preliminary stab at the beginning of
>> template parsing for clang. It's not complete, it doesn't do
>> anything, there's no AST stuff, I haven't even considered scopes
>> and name resolution, etc., etc. It just recognizes "template
>> <...>". I had hoped to spend some spare time, an hour or so a day
>> (whenever possible) to continue working on this. Please bear in
>> mind that a) I've never worked on a real compiler before and b) I
>> probably don't fully understand the requirements of what I'm
>> working on.
>>
>> I hope this is an adequate start.
>>
>>
>> What should I be doing with the templates patch? Its growing steadily
>> larger and I'll probably get to a point soon where I have to step on a
>> lot of code to get anything else built.
> When it's in a state where it has some closure (e.g. parsing
> declarations works, even if you can't actually use those parameters and
> sema never hears of it or treats it as non-templates), and you've
> written a few test cases, submit it for review. It has to do something
> useful (at least for testability), it should not crash the compiler
> under any circumstances.
Exactly. Then one of the main Clang developers will merge your patch
into Subversion. After a
> I think a big discussion is in order before touching sema of templates
> anyway. We have to plan the template engine.
Yes, that's a big chunk of design work. I expect that it'll happen
when a few people get together to come up with a coherent design and
prototype, then bring it to the larger Clang community for review and
ideas.
- Doug
More information about the cfe-dev
mailing list