Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TR1 from Boost or VC10 - Which one is better?

I'm currently migrating from Visual Studio 2008 to 2010. My software makes heavy use of Boost and its TR1 features. I now get a lot of compiler errors, because VC10 has it's own TR1 implementation.

I know I can disable Microsoft's TR1 implementation with the _HAS_CPP0X switch (see here), but I'm not sure if this also disables other features that could be interesting in the future.

So, I'm wondering which is the better implementation of TR1: the one from Boost or the one from Microsoft? Are there any differences at all? Does disabling the Microsoft implementation have any disadvantages?

like image 766
Michel Krämer Avatar asked Nov 15 '22 08:11

Michel Krämer


1 Answers

If your code doesn't compile with VC10's standard library, then that might indicate that it isn't standard-conforming. The standard library in VC10 comes from Dinkumware, and these guys aren't bad when it comes to implementing a standard library. (PJP used to be the lib working group's chair.) I'd look very closely at each issue, before dismissing it as a VC-specific problem, lest you might not be future-compatible.

Also, TTBOMK, VC10 doesn't just come with TR1, but with C++1x (e.g., std::shared_ptr instead of std::tr1::shared_ptr; ICBWT), so boost's and VC10's libraries actually aren't fully comparable.

like image 174
sbi Avatar answered Dec 29 '22 01:12

sbi