首页 > C/C++ > 如何使用stl替换boost
2017
07-12

如何使用stl替换boost

如何使用stl替换boost,以下是我在用stl 替换 boost 库中积累的一些知识,希望能够帮到你!

booststl
boost::uintmax_tuintmax_t
boost::uint64_tuint64_t
boost::int64_tint64_t
boost::shared_arraystd::shared_ptr>
std::string s = "ABC";
boost::to_lower_copy(s);
std::string s = "ABC";
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
boost::bind(&class::func, this,_1,_2)std::bind(&class::func, this, std::placeholders::_1, std::placeholders::_2)
boost::posix_time::second_clock::local_time()std::localtime(std::time(NULL))
boost::posix_time::ptimestd::time_t or std::chrono::steady_clock::time_point
boost::posix_time::seconds(100)std::chrono::seconds(100)
boost::posix_time::milliseconds(100)std::chrono::milliseconds(100)
boost::this_thread::sleep(boost::posix_time::seconds(100))std::this_thread::sleep_for(std::chrono::seconds(100))
boost::posix_time::second_clock::local_time() + boost::posix_time::seconds(time);std::chrono::system_clock::to_time_t(std::chrono::system_clock::now() + std::chrono::seconds(time));
boost::throw_exceptionstd::exception or asio::detail::throw_exception
boost::system::system_errorstd::system_error
BOOST_ASSERTassert
boost::make_sharedstd::make_shared
boost::mutexstd::mutex or asio::detail::mutex
boost::shared_ptrstd::shared_ptr
boost::system::error_codestd::error_code
boost::scoped_ptrasio::detail::scoped_ptr
boost::conditionstd::condition_variable
boost::arraystd::array
boost::refstd::ref
boost::deadline_timerasio::steady_timer
catch (boost::bad_lexical_cast&)catch (std::bad_cast&)

 

最后编辑:
作者:dnybz
这个作者貌似有点懒,什么都没有留下。