C++ PATCH for c++/56208 (wrong sfinae with private inheritance)

Jason Merrill jason@redhat.com
Wed Feb 6 03:28:00 GMT 2013

In this case, when we see the explicit template arguments for test and 
go to substitute them into the type of sfinae_base::test, we were 
recording that we wanted to check access to sfinae_base::make in the 
context of is_printable, but then by the time we got around to checking 
it we had pushed into the context of sfinae_base which doesn't have the 
right to see make by way of is_printable.  Fixed by discarding any 
deferred access checks from explicit template argument substitution, 
because we'll get the same access checks when we substitute in all the 
template arguments in instantiate_template, and those will have the 
right access path.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 56208.patch
Type: text/x-patch
Size: 1708 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130206/9e164d01/attachment.bin>

More information about the Gcc-patches mailing list