Top "Std" questions

The C++ Standard Library, and its namespace.

What's the difference between std::to_string, boost::to_string, and boost::lexical_cast<std::string>?

What's the purpose of boost::to_string (found in boost/exception/to_string.hpp) and how does it differ from …

c++ boost std tostring lexical-cast
What can std::numeric_limits<double>::epsilon() be used for?

unsigned int updateStandardStopping(unsigned int numInliers, unsigned int totPoints, unsigned int sampleSize) { double max_hypotheses_=85000; double n_inliers = 1.0; double n_…

c++ std numeric-limits
Assign a std::vector to a std::valarray

I have a vector<vector<double>, so a table (matrix) of values. Columns contains position and velocity …

c++ c++11 variable-assignment std valarray
Link different C++ standard libraries on Mac OS X

Now that multiple C++ standard libraries can exist on Mac OS X, it now looks like quite a chaotic situation. …

c++ macos std libstdc++ libc++
Can you combine std::recursive_mutex with std::condition_variable?

Can you combine std::recursive_mutex with std::condition_variable, meaning do something like this: std::unique_lock<std::…

c++ multithreading c++11 std recursive-mutex
How to make a c++11 std::unordered_set of std::weak_ptr

I have a set like this: set<weak_ptr<Node>, owner_less<weak_ptr<Node&…

c++ c++11 std unordered-set weak-ptr
std::result_of simple function

#include <iostream> #include <type_traits> double f(int i) { return i+0.1; } struct F { public: double operator ()(…

c++ c++11 std result-of
Is there any C++ standard class/function which is similar to GetTickCount() on Windows?

unsigned int Tick = GetTickCount(); This code is running only on Windows, but I want to use the C++ Standard library …

c++ c++11 std chrono gettickcount
Boost multi-index container vs a multi-level mapping container based on std::unordered_map (map of maps)

I recently found boost::multi_index_container and I'm curious about his performance compared to my own implementation of a …

c++ boost std unordered-map boost-multi-index
std::condition_variable::wait with predicate

In the documentation for std::condition_variable, there is an overload of wait() taking as argument a predicate function. The …

c++ multithreading c++11 std condition-variable