// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s template T&& declval() noexcept; template struct some_trait { static const bool value = false; }; template void swap(T& x, T& y) noexcept(some_trait::value) { T tmp(static_cast(x)); x = static_cast(y); y = static_cast(tmp); } template struct array { T data[N]; void swap(array& a) noexcept(noexcept(::swap(declval(), declval()))); }; struct DefaultOnly { DefaultOnly() = default; DefaultOnly(const DefaultOnly&) = delete; DefaultOnly& operator=(const DefaultOnly&) = delete; ~DefaultOnly() = default; }; int main() { array a, b; }