I would consider "proper" implementation for `is_swappable` to be the following:

```
template<class T, class U = T> struct is_swappable<T, U> : /* see below */ { }

```

`is_swappable` inherits from [`std::true_type`](http://en.cppreference.com/w/cpp/types/integral_constant) if T and U are [**`Swappable`**](http://en.cppreference.com/w/cpp/concept/Swappable), otherwise from [`std::false_type`](http://en.cppreference.com/w/cpp/types/integral_constant).

---

I have tried many things, but SFINAE just doesn't seem to work. This is a particularly nasty counterexample:

```
struct A {
    A() {}
    ~A() {}
    A(const A&) = delete;
    A(A&&) = delete;
};

```

Clearly `A` is not [**`Swappable`**](http://en.cppreference.com/w/cpp/concept/Swappable). Yet any generic solution I can come up with does not properly handle the above example.

A SFINAE implementation I have tried, but did not work looked like this:

```
namespace with_std_swap {
    using std::swap;

    template<class T, class U, class =
        decltype(swap(std::declval<T&>(), std::declval<U&>()))>
    std::true_type swappable_test(int);

    template<class, class> std::false_type swappable_test(...);
}

template<class T, class U = T>
struct is_swappable
: decltype(with_std_swap::using_std_swap::swappable_test<T, U>(0)) { };

```

Is there any way to code `is_swappable` without compiler help?