From b9282a9672cba70ad5d6c6ee337e1bbde957b495 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sat, 13 Oct 2007 21:25:29 +0000 Subject: [PATCH] Merge from trunk [SVN r39987] --- test/experimental_1.cpp | 26 ++++++++++++++++++++++++++ test/experimental_2.cpp | 39 +++++++++++++++++++++++++++++++++++++++ test/experimental_3.cpp | 23 +++++++++++++++++++++++ test/experimental_4.cpp | 9 +++++++++ 4 files changed, 97 insertions(+) create mode 100755 test/experimental_1.cpp create mode 100755 test/experimental_2.cpp create mode 100755 test/experimental_3.cpp create mode 100755 test/experimental_4.cpp diff --git a/test/experimental_1.cpp b/test/experimental_1.cpp new file mode 100755 index 0000000..a731e7a --- /dev/null +++ b/test/experimental_1.cpp @@ -0,0 +1,26 @@ + +template +struct msvc_extract_type +{ + template + struct id2type_impl; + + typedef id2type_impl id2type; +}; + +template +struct msvc_register_type : msvc_extract_type +{ + template<> + struct id2type_impl //VC7.0 specific bugfeature + { + typedef T type; + }; +}; + +int main() { + sizeof(msvc_register_type); + typedef msvc_extract_type::id2type::type deduced_type; + deduced_type f=5.0; + return 0; +} \ No newline at end of file diff --git a/test/experimental_2.cpp b/test/experimental_2.cpp new file mode 100755 index 0000000..4cb68d9 --- /dev/null +++ b/test/experimental_2.cpp @@ -0,0 +1,39 @@ + +struct msvc_extract_type_default_param {}; + +template +struct msvc_extract_type; + +template +struct msvc_extract_type { + template + struct id2type_impl; + + typedef id2type_impl id2type; +}; + +template +struct msvc_extract_type : msvc_extract_type +{ + template<> + struct id2type_impl //VC8.0 specific bugfeature + { + typedef T type; + }; + template + struct id2type_impl; + + typedef id2type_impl id2type; +}; + +template +struct msvc_register_type : msvc_extract_type +{ +}; + +int main() { + sizeof(msvc_register_type); + typedef msvc_extract_type::id2type::type deduced_type; + deduced_type f=5.0; + return 0; +} \ No newline at end of file diff --git a/test/experimental_3.cpp b/test/experimental_3.cpp new file mode 100755 index 0000000..5f83165 --- /dev/null +++ b/test/experimental_3.cpp @@ -0,0 +1,23 @@ + +template +struct msvc_extract_type +{ + struct id2type; +}; + +template +struct msvc_register_type : msvc_extract_type +{ + typedef msvc_extract_type base_type; + struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature + { + typedef T type; + }; +}; + +int main() { + sizeof(msvc_register_type); + typedef msvc_extract_type::id2type::type deduced_type; + deduced_type f=5.0; + return 0; +} \ No newline at end of file diff --git a/test/experimental_4.cpp b/test/experimental_4.cpp new file mode 100755 index 0000000..a0a61d0 --- /dev/null +++ b/test/experimental_4.cpp @@ -0,0 +1,9 @@ +#include + +template +struct msvc_register_type { +}; + +int main() { + msvc_register_type; +} \ No newline at end of file