This is the mail archive of the gcc-bugs@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]

[Bug c++/13640] Failing to reject class template partial specialization which can never be selected


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-01 01:31 -------
Subject: Re:  Failing to reject class template partial specialization which can never be selected

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| (In reply to comment #8)
| 
| > And if you're going to make that a warning, please
| > put it off by default, because that is going to waste cycles and increase
| > compile-time -- because, you'll need to do partial template ordering.
| 
| I'm looking into a simple sintactic solution. Within 
| process_partial_specialization, I go through the inner_args and check if the 
| template parameters appear only in non-deduced contexts (for a start: within 
| nested-name-specifiers). If that's true, I emit a warning. Am I missing 
| something? It looks like it's going to work.

Yes, essentially, something like that should catch many of the
non-deducible contexts use (note that real argument deduction process
may fail for other reasons).  I don't know whether you may reduce the
computational complexity by caching the "deducibility" property
(otherwise, it sounds like you're describing an algorith, that would
quadratic).  On the other hand, I would expect people using that
falg not (ab)using deep template-arguments lists.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13640


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