RE: [Boost-Users] call_traits and MSVC 7.1
From: Randy Bowen [mailto:rbowen@stamps.com] Sent: Wednesday, May 07, 2003 5:46 PM To: Boost-Users@yahoogroups.com Subject: [Boost-Users] call_traits and MSVC 7.1
We have been using call_traits from Boost version 1.29.0 in conjunction with MSVC 7.0. When attempting to recompile this code under MSVC 7.1, using either Boost 1.29.0 or 1.30.0, we now encounter compilation errors. A simple example of the usage pattern is:
<code snipped> This is illegal code. That it compiled in MSVC 7.0 was a bug. The template parameter '_Source' can not be deduced from the callsite of doSomething. 14.8.2.4 in the ISO/IEC 14882 lists the forms in which template parameters can be deduced, but a qualified name involving nested types is not one of them. I suspect it's because of something like this: template<typename T> struct S { typedef T type; }; template<> struct S<char> { typedef int type; }; template<typename T> void foo(typename S<T>::type); int main() { foo(3); //what is T deduced to be? } I'd guess the documentation for call_traits discusses typical usage patterns, and may help. You can also explicitly specify the template argument. Hope this helps. Arjun Bijanki Microsoft Visual C++
participants (1)
-
Arjun Bijanki