Use type_traits to test if copyable/assignable

Replace compile tests that check if types are copy constructible and copy assignable with normal tests that use type_traits (if available).
This commit is contained in:
Victor Zverovich
2014-09-30 07:30:05 -07:00
parent d00f689c40
commit 313b259891
2 changed files with 14 additions and 8 deletions

View File

@@ -22,14 +22,6 @@ function (expect_compile_error code)
endif ()
endfunction ()
# Array is noncopyable.
expect_compile_error("fmt::internal::Array<char, 5> a, b(a);")
expect_compile_error("fmt::internal::Array<char, 5> a, b; b = a;")
# Writer is noncopyable.
expect_compile_error("const fmt::Writer a, b(a);")
expect_compile_error("fmt::Writer a, b; b = a;")
# MakeArg doesn't accept [const] volatile char *.
expect_compile_error("volatile char s[] = \"test\"; (fmt::internal::MakeArg<char>)(s);")
expect_compile_error("const volatile char s[] = \"test\"; (fmt::internal::MakeArg<char>)(s);")