Use SFINAE to only cast away volatile when necessary.

Also clean up namespace and symbol exposure.

Change-Id: Ic32e0181e1a293998361667db1c5461026f8d3a4
On Mon, Jun 9, 2014 at 6:37 PM, awong-dev <notifications@github.com> wrote:

> In sources/cxx-stl/llvm-libc++/libcxx/include/atomic:
>
> >    T __a_value;
> >  };
> > -#define _Atomic(x) __gcc_compat_atomic<x>
> > +#define _Atomic(x) __gcc_atomic::__gcc_atomic_t<x>
> > +
> > +template <typename T> T __create();
> > +
> > +template <typename __Tp, typename __Td,
> > +          typename = decltype(__Tp()->__a_value = __create<__Td>())>
> > +char __test(int);
>
> The pattern used in type_traits seems to be just to call this thing
> __test()
>

I suppose, but then it's in a namespace that indicates what it does (e.g.
__libcpp_is_function_imp::__test).
__gcc_atomic::__test isn't exactly meaningful...

 —
> Reply to this email directly or view it on GitHub
> <https://github.com/awong-dev/ndk/pull/137/files#r13574246>.
>