Top "Std" questions

The C++ Standard Library, and its namespace.

How to combine the use of std::bind with std::shared_ptr

I need to do something like this more than often: AsyncOperation * pAsyncOperation = new AsyncOperation(); auto bindOperation = std::bind(&AsyncOperation::…

c++ c++11 std shared-ptr stdbind
Passing rvalues through std::bind

I want to pass an rvalue through std::bind to a function that takes an rvalue reference in C++0x. …

c++ c++11 std rvalue-reference rvalue
QThread vs std::thread

I saw different topics on "pthread vs std::thread" and "QThread vs pthread" but none on "std::thread vs QThread". …

c++ multithreading qt std qthread
error: cannot convert 'std::basic_string<char>::iterator ...' to 'const char* for argument '1' ...'

I'm getting the following error: error: cannot convert 'std::basic_string<char>::iterator {aka __gnu_cxx::__normal _iterator&…

c++ compiler-errors char std gnu
Intersection of two `std::map`s

Given that I have two std::maps, say: map<int, double> A; map<int, double> B; …

c++ dictionary std stdmap c++-standard-library
Fast way to write data from a std::vector to a text file

I currently write a set of doubles from a vector to a text file like this: std::ofstream fout; fout.…

c++ std ofstream
Does there exist something like std::tie for std::pair?

Eg with tuples: #include <tuple> // std::tuple, std::make_tuple, std::tie int num; char letter; std::tuple&…

c++ c++11 std std-pair
std::regex, to match begin/end of string

In JS regular expressions symbols ^ and $ designate start and end of the string. And only with /m modifier (multiline mode) …

c++ regex c++11 std multiline
Create a dump file for an application whenever it crashes

I am trying to create a dump file for my application whenever it crashes. I am currently using procdump.exe …

c++ visual-studio-2008 std crash-dumps minidump
Why is stringstreams rdbuf() and str() giving me different output?

I have this code, int main() { std::string st; std::stringstream ss; ss<<"hej hej med dig"<&…

c++ std stringstream getline sstream