[cfe-commits] r73072 - /cfe/trunk/test/SemaTemplate/temp_class_spec.cpp

Douglas Gregor dgregor at apple.com
Mon Jun 8 09:04:08 PDT 2009


Author: dgregor
Date: Mon Jun  8 11:04:08 2009
New Revision: 73072

URL: http://llvm.org/viewvc/llvm-project?rev=73072&view=rev
Log:
Test template argument deduction on function types a little more

Modified:
    cfe/trunk/test/SemaTemplate/temp_class_spec.cpp

Modified: cfe/trunk/test/SemaTemplate/temp_class_spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_class_spec.cpp?rev=73072&r1=73071&r2=73072&view=diff

==============================================================================
--- cfe/trunk/test/SemaTemplate/temp_class_spec.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp_class_spec.cpp Mon Jun  8 11:04:08 2009
@@ -134,3 +134,15 @@
 int is_unary_function7[is_unary_function_with_same_return_type_as_argument_type<int (*)(int, bool)>::value ? -1 : 1];
 int is_unary_function8[is_unary_function_with_same_return_type_as_argument_type<int (*)(bool)>::value ? -1 : 1];
 int is_unary_function9[is_unary_function_with_same_return_type_as_argument_type<int (*)(int)>::value ? 1 : -1];
+
+template<typename T>
+struct is_binary_function {
+  static const bool value = false;
+};
+
+template<typename R, typename T1, typename T2>
+struct is_binary_function<R(T1, T2)> {
+  static const bool value = true;
+};
+
+int is_binary_function0[is_binary_function<int(float, double)>::value? 1 : -1];





More information about the cfe-commits mailing list