diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-08 16:04:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-08 16:04:08 +0000 |
commit | 6f998fcb1d2ebc37a255e1a5ba25e2d2cc5a611d (patch) | |
tree | 48b08709356d2914c6880349b0c0733ca4685d28 /clang/test/SemaTemplate/temp_class_spec.cpp | |
parent | f661016b0351c5581d8c653b8b72ef23feb5081d (diff) | |
download | bcm5719-llvm-6f998fcb1d2ebc37a255e1a5ba25e2d2cc5a611d.tar.gz bcm5719-llvm-6f998fcb1d2ebc37a255e1a5ba25e2d2cc5a611d.zip |
Test template argument deduction on function types a little more
llvm-svn: 73072
Diffstat (limited to 'clang/test/SemaTemplate/temp_class_spec.cpp')
-rw-r--r-- | clang/test/SemaTemplate/temp_class_spec.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/temp_class_spec.cpp b/clang/test/SemaTemplate/temp_class_spec.cpp index 4e4f5560aef..8376ae3bd71 100644 --- a/clang/test/SemaTemplate/temp_class_spec.cpp +++ b/clang/test/SemaTemplate/temp_class_spec.cpp @@ -134,3 +134,15 @@ int is_unary_function6[is_unary_function_with_same_return_type_as_argument_type< 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]; |