   MSVC 2010 Sanity Check
  I need a sanity check on some things I'm seeing with MSVC 2010. And as far as I can tell, I'm fully up to date with both the Visual Studio installation (Professional, in case it matters) and the help files.First, with /W4 the code if (0) {} generates a C4127. However, C4127 doesn't seem to be anywhere in my local installation of the dev 10 help system, even though other warnings do show up like C4129 and C4124 and C4127 does show up on MSDN online. Does this warning show up in anyone else's local help installation?Next, there are two functions that show up in my local help installation and MSDN,  checked_uninitialized_copy() and  unchecked_uninitialized_copy(). The documentation claims that the proper header is memory and these two functions live in the stdext namespace. As far as I can tell, these two functions show up in none of the headers for MSVC and if I include just the memory header, I can't even get stdext namespace to register much less get either of these functions to work. (ex: using stdext::checked_uninitialized_copy inside main() brings up a C2653 about stdext not being a valid class or namespace and a C2065 for checked_uninitialized_copy being an undeclared identifier.) Does this happen to anyone else?Finally, the local help and MSDN entries for std::make_shared() and  std::allocate_shared() both show the function prototypes using variadic templates. However, as far as I can tell, MSVC 2010 doesn't support variadic templates, and the implementations for both functions appear to use preprocessor hackery to create overloads for up to ten arguments. Passing eleven arguments causes the functions to blow up and there doesn't seem to be any easy way to increase the number of arguments. Does this match up with other people's installations?   
Quote:Original post by SiCraneFinally, the local help and MSDN entries for std::make_shared() and  std::allocate_shared() both show the function prototypes using variadic templates. However, as far as I can tell, MSVC 2010 doesn't support variadic templates, and the implementations for both functions appear to use preprocessor hackery to create overloads for up to ten arguments. Passing eleven arguments causes the functions to blow up and there doesn't seem to be any easy way to increase the number of arguments. Does this match up with other people's installations?That observation is correct. MSVC 2010 does not support variadic templates (I don't recall an explicit mention at http://blogs.msdn.com/vcblog/, but if you dig through comments you'll find confirmation of this lack of support). Variadic templates are simulated in various places of the STL implementation via the hackery that you found.   ;Quote:Original post by SiCraneI need a sanity check on some things I'm seeing with MSVC 2010. And as far as I can tell, I'm fully up to date with both the Visual Studio installation (Professional, in case it matters) and the help files.I'm currently running Ultimate...Quote:First, with /W4 the code if (0) {} generates a C4127. However, C4127 doesn't seem to be anywhere in my local installation of the dev 10 help system, even though other warnings do show up like C4129 and C4124 and C4127 does show up on MSDN online. Does this warning show up in anyone else's local help installation?No, it's online help only. I have all help files installed from both media and online sources (except VB).Quote:Next, there are two functions that show up in my local help installation and MSDN,  checked_uninitialized_copy() and  unchecked_uninitialized_copy(). The documentation claims that the proper header is memory and these two functions live in the stdext namespace. As far as I can tell, these two functions show up in none of the headers for MSVC and if I include just the memory header, I can't even get stdext namespace to register much less get either of these functions to work. (ex: using stdext::checked_uninitialized_copy inside main() brings up a C2653 about stdext not being a valid class or namespace and a C2065 for checked_uninitialized_copy being an undeclared identifier.) Does this happen to anyone else?No, these do not exist currently. This is a newer edition of the standard library, but I believe the help documents haven't been updated.Quote:Finally, the local help and MSDN entries for std::make_shared() and  std::allocate_shared() both show the function prototypes using variadic templates. However, as far as I can tell, MSVC 2010 doesn't support variadic templates, and the implementations for both functions appear to use preprocessor hackery to create overloads for up to ten arguments. Passing eleven arguments causes the functions to blow up and there doesn't seem to be any easy way to increase the number of arguments. Does this match up with other people's installations?VS2010 uses a method similar to boost PP for the arguments. It does not support variadic templates.   ;  Wonderful. The fine gentlemen at Microsoft mark a bazillion functions deprecated willy-nilly and then go and remove functions that they didn't mark deprecated ... including ones they added to be used instead of the ones they did mark deprecated. And I can't even consult the documentation to see which ones got the boot.Thanks for the responses guys. I appreciate it.   ;Quote:Original post by mutexQuote:Original post by SiCraneFinally, the local help and MSDN entries for std::make_shared() and  std::allocate_shared() both show the function prototypes using variadic templates. However, as far as I can tell, MSVC 2010 doesn't support variadic templates, and the implementations for both functions appear to use preprocessor hackery to create overloads for up to ten arguments. Passing eleven arguments causes the functions to blow up and there doesn't seem to be any easy way to increase the number of arguments. Does this match up with other people's installations?That observation is correct. MSVC 2010 does not support variadic templates (I don't recall an explicit mention at http://blogs.msdn.com/vcblog/, but if you dig through comments you'll find confirmation of this lack of support). Variadic templates are simulated in various places of the STL implementation via the hackery that you found.Here's a handy chart that seems to verify MSVC lack of Variadic template support:Summary of C++0x Feature Availability in gcc and MSVCEven if you choose to install and just use local help it still seems to open up in a browser instead of Microsoft Document Explorer, which is quite annoying for me.