<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 28/04/15 23:31, Reid Kleckner wrote:<br>
</div>
<blockquote
cite="mid:CACs=ty+MOGjaL=HAhKaaCoDqwAdk+MC=o+fMcVm2hqGNPx2D0A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Apr 15, 2015 at 10:25 PM,
Peter Stirling <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div> Visitor::RequestCompleteType() calls
Sema::RequireCompleteType() (which IMO has the wrong
name, it returns false on what I would consider, from
the name, success).<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Much has been made about the sense of boolean return
values in Clang. It isn't consistent or sane, but such is
life. =/</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div> 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?</div>
</div>
</blockquote>
<div><br>
</div>
<div>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.</div>
</div>
</div>
</div>
</blockquote>
<br>
Perhaps I misunderstand what you mean by 'instantiate' but this
doesn't seem to be the case. When I walk the CXXRecordDecl for
'std::pair<int const, int const>' there ARE declarations for
the methods that require mutation. My tool scans the AST for
functions and methods and outputs a file containing functions that
invoke the ones it finds, which is then compiled into a shared
library, so what I want is protection against functions that can't
be called.<br>
<br>
How do I go about asking for an instantiation of a method on its
own?<br>
</body>
</html>