diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-08-28 09:59:48 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-08-31 10:34:36 -0400 |
commit | a5960d1f2683f4debb732f5cf4042b6d6418ef84 (patch) | |
tree | bf660b6eaf4c722819487ea17b2b7cd8f29b1a7f /src/mongo/stdx | |
parent | 518118bfce4da06e6c26063e125f90e30a1b3baa (diff) | |
download | mongo-a5960d1f2683f4debb732f5cf4042b6d6418ef84.tar.gz |
SERVER-19769 Use std::function to back stdx::function on windows
While std::function has some broken edge cases on VS2013, so does
boost::function in boost 1.56. Rather than upgrade boost, use MSVC's
std::function and fix up the few places that need adjustment.
Diffstat (limited to 'src/mongo/stdx')
-rw-r--r-- | src/mongo/stdx/functional.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/mongo/stdx/functional.h b/src/mongo/stdx/functional.h index b0c6b922f99..0921cd22c94 100644 --- a/src/mongo/stdx/functional.h +++ b/src/mongo/stdx/functional.h @@ -28,15 +28,6 @@ #pragma once -// As of VS2013, the Windows STL still doesn't have an adequate implementation -// of std::function. -// -// See https://connect.microsoft.com/VisualStudio/feedback/details/768899/ -// std-function-not-compiling-in-vs2012 -// -// The bug is fixed in VS2015. -#if !defined(_MSC_VER) || (_MSC_VER > 1800) - #include <functional> namespace mongo { @@ -50,34 +41,3 @@ namespace placeholders = ::std::placeholders; // NOLINT } // namespace stdx } // namespace mongo - -#else - -#include <boost/bind.hpp> -#include <boost/function.hpp> -#include <boost/ref.hpp> - -namespace mongo { -namespace stdx { - -using boost::bind; // NOLINT -using boost::cref; // NOLINT -using boost::function; // NOLINT -using boost::ref; // NOLINT - -namespace placeholders { -static boost::arg<1> _1; -static boost::arg<2> _2; -static boost::arg<3> _3; -static boost::arg<4> _4; -static boost::arg<5> _5; -static boost::arg<6> _6; -static boost::arg<7> _7; -static boost::arg<8> _8; -static boost::arg<9> _9; -} // namespace placeholders - -} // namespace stdx -} // namespace mongo - -#endif |