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:
1 parent
d00f689c40
commit
313b259891
2 files changed
+14
-8
No files matched your search
@@ -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);")
|
||||
|
||||
Reference in new issue
Block a user