6 private links
One of the new features in C++11 aimed at increased code efficiency is the emplace family of methods in containers. std::vector, for example, has an emplace_back method to parallel push_back, and emplace to parallel insert.
Namely, how can we merge multiple type-erased interfaces into one single interface. A similar question is also asked in the end of the first talk: How to apply type erasure to types with overlapping interfaces?
A list of c++'s containers and how to choose a container in c++.
Merge sort is a wonderful, widely used sorting algorithm, with consistent data-independent performance. When not in-place merge sorting, that is when the source and destination array are not the same, performance is O(nlgn). When in-place, so the source and destination array are the same, performance is slightly slower: O(nlg2n). Because not-in-place sorting algorithms are faster, implementations frequently allocate memory for the destination array, copy the sorted result back into the source array, and proceed to deallocate the destination array. STL uses this type of a strategy to construct a fast in-place sort from a faster not-in-place sort whenever memory is available. Of course, when memory is not available, in-place sort is necessary, and STL also provides such an implementation.
In this post we will learn C++ templates in depth: Class and function templates, template parameters, variadic templates, all with in depth examples.
In this Article, we will discuss the following topics:
Getting the Python C/C++ API for working.
Initialize and Destroy a Python environment.
Running a Simple inline Python code from C/C++.
Running a Simple Python program from file from C/C++ program.
Call a Python method from C/C++.
Call a C/C++ function from Python code.
Why are we doing this???? (Points of Interest)
Pipable functions allow us to write extension methods in C++. This overloads the pipe | operator to allow chaining several functions together, like the example below:
Starting a thread in C++11 is as simple as declaring and instantiating a new object. We will analyze a simple multithreaded application to demonstrate how we can use the threads from the C++ standard library.
Memoization is a pretty well-known optimization technique which consists in “remembering” (i.e.: caching) the results of previous calls to a function, so that repeated calls with the same parameters are resolved without repeating the original computation.
This article examines various aspects of type declaration and deduction in both current standard
C++ as well as the forthcoming revised standard (C++0x), with an eye towards helping developers
understand how and why the effective type of a variable can be different from what's “obvious.”
Readers will find the article most useful if they are familiar with the basic rules for template argu
ment deduction, are aware of the difference between lvalues and rvalues, and have had some
exposure to the new C++0x features lvalue and rvalue references,
auto
variables, and lambda
expressions
Full devirtualization replaces given polymorphic by a direct call (that can get inlined later). Speculative devirtualization is a weaker form turning polymorphic call to a conditional testing whether the target is the predicted one and going by direct call path if it happens to be so and doing the indirect call otherwise.
Really good explanation of lambda implementations in c++
One of the most exciting features of C++11 is ability to create lambda functions (sometimes referred to as closures). What does this mean? A lambda function is a function that you can write inline in your source code (usually to pass in to another function, similar to the idea of a functor or function pointer).
This article discusses a series of features new to C++11 that all developers should learn and use. There are lots of new additions to the language and the standard library, and this article barely scratches the surface. However, I believe some of these new features should become routine for all C++ developers
cheerp is the C++ compiler for the web
Write a web application, or port your existing one, all in C++. cheerp will generate JavaScript code that can run on any browser.