summaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-internal.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2011-03-05 08:04:01 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2011-03-05 08:04:01 (GMT)
commit603533a0a4dcfc2ef33051b9ae8237568a19adc4 (patch)
tree38e1e22186034693ba63f609100fcd1d4cd6e368 /include/gtest/internal/gtest-internal.h
parent66ac4909aea5c4dc9c43e6f11518c34049c6bd5e (diff)
downloadgoogletest-603533a0a4dcfc2ef33051b9ae8237568a19adc4.zip
googletest-603533a0a4dcfc2ef33051b9ae8237568a19adc4.tar.gz
googletest-603533a0a4dcfc2ef33051b9ae8237568a19adc4.tar.bz2
Fixes compatibility with Borland C++Builder. Original patch by Josh
Kelley. Simplified by Zhanyong Wan.
Diffstat (limited to 'include/gtest/internal/gtest-internal.h')
-rw-r--r--include/gtest/internal/gtest-internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h
index db098a4..947b162 100644
--- a/include/gtest/internal/gtest-internal.h
+++ b/include/gtest/internal/gtest-internal.h
@@ -873,6 +873,11 @@ class ImplicitlyConvertible {
static const bool value =
sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
# pragma warning(pop) // Restores the warning state.
+#elif defined(__BORLANDC__)
+ // C++Builder cannot use member overload resolution during template
+ // instantiation. The simplest workaround is to use its C++0x type traits
+ // functions (C++Builder 2009 and above only).
+ static const bool value = __is_convertible(From, To);
#else
static const bool value =
sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;