[cfe-dev] class template methods

Reid Kleckner rnk at google.com
Tue Apr 28 15:31:20 PDT 2015


On Wed, Apr 15, 2015 at 10:25 PM, Peter Stirling <peter at pjstirling.plus.com>
wrote:
>
> Visitor::RequestCompleteType() calls Sema::RequireCompleteType() (which
> IMO has the wrong name, it returns false on what I would consider, from the
> name, success).
>

Much has been made about the sense of boolean return values in Clang. It
isn't consistent or sane, but such is life. =/


> So, I don't construct the specializations for methods directly in my code,
> I assume that some of the instantiation is performed by
> RequireCompleteType(), but surely if I checked for SFINAE at that level
> then I would lose EVERY methods for std::pair<int const, int const> and not
> just the ones that involve mutation?
>

I think RequireCompleteType won't instantiate all the member functions,
like operator=, but you can look it up, and ask for an instantiation of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150428/3afbfda9/attachment.html>


More information about the cfe-dev mailing list