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