Top "Std" questions

The C++ Standard Library, and its namespace.

using out of scope variables in C++11 lambda expressions

I'm playing with C++11 for fun. I'm wondering why this happens: //... std::vector<P_EndPoint> agents; P_CommunicationProtocol …

c++ c++11 lambda std capture
Is it good practice to use std::vector as a simple buffer?

I have an application that is performing some processing on some images. Given that I know the width/height/format …

c++ std stdvector
Getting the bounding box of a vector of points?

I have a vector of points stored in a std::vector instance. I want to calculate the bounding box of …

c++ boost std bounding-box
How can I use Standard Library (STL) classes in my dll interface or ABI?

There have been a few questions before on exporting a class which contains stl classes in relation to visual studio …

c++ dll c++11 stl std
Why has std::reduce been added in C++17?

I was looking for a thorough explanation of the meaning of "Return value" description for std::reduce, which according to …

c++ std c++17
Why is there no clamp function in math.h

math.h goes to the trouble of providing min and max, but not a clamp function. I would have thought …

c++ std clamp
creating an ostream

I am trying to create a c++ ostream for educational reasons. My test will be creating an ostream that acts …

c++ std ostream
Why does numeric_limits::min return a negative value for int but positive values for float/double?

Why does numeric_limits::min return a negative value for int, but positive values for e.g. float and double? #…

c++ std numeric-limits
C++ const std::map reference fails to compile

Is there a reason why passing a reference to a std::map as const causes the [] operator to break? I …

c++ find std operator-keyword stdmap
How do you clear a std::ostringstream instance so it can be reused?

Possible Duplicate: How to reuse an ostringstream? I have been using std::ostringstream to convert float and int values to …

c++ string std stringstream