Is there any template available in boost for RAII. There are classes like scoped_ptr, shared_ptr which basically work on pointer. Can those classes be used for any other resources other than pointers.
I was wondering if C++0x provides any built-in capabilities to check if a parameter pack of a variadic template contains a specific type. Today, boost:::mpl::contains can be used to accomplish this if
In C++11, we can get an efficiency boost by using std::move when we want to move (destructively copy) values into a container:
One of the cool new C++ features in Visual Studio 2010 are lambda expressions. However, I can\'t get them to work within a managed class.
I am searching for a way to determine at runtime, which type of object should be alloced (based on a given class name, which is of type const char*).
In C++98, I can copy ranges with the std::copy algorithm. std::copy(source.begin(), source.end(), destination.begin());
I am new to C++11. I am writing the following recursive lambda function, but it doesn\'t compile. sum.cpp
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
C++ compilers automatically generate copy constructors and copy-assignment operators. Why not swap too?
I know that as of the C++03 standard, function-scope static initializations are not guaranteed to be thread safe: