awong-dev/ndk — pull request #130 by awong-dev (2014-06-06 00:23:01+00:00)
Title: Ensure substitution failure occurs in is_convertible before constructor ...

...access check.

Using template check(T) in a situation such as
check(const MoveOnly&) generates a compile faliure on g++.
Talked with sleevi@ about this and it's unclear to both of us what
the spec says should happen here. In C++03, it seems valid for g++
to consider the type matching "valid" during overload resolution and
then to later to emit a diagnostic relating to access visibility of
the needed copy constructor for the MoveOnly type.

This patch just rewrites the SFINAE formulation to completely avoid
the issue.

Change-Id: I450b808764db35c33bdd1b5e85fad04c50be997a