To Iterate Is Human, to Range Is Divine
ost Standard Library algorithms operate on sequences whose boundaries are designated by a pair of iterators: one iterator marks the beginning of the sequence and another marks its end. Combining
ost Standard Library algorithms operate on sequences whose boundaries are designated by a pair of iterators: one iterator marks the beginning of the sequence and another marks its end. Combining
++03 has a very limited set of tools for enforcing constraints on templates. Consequently, templates code becomes messy, unintelligible, and buggy. With the addition of concepts to C++09, this unsavory
omplex numbers are widely-used in electrical engineering, simulations, and scientific applications. And yet, many software engineers who have to use complex arithmetic insist on reinventing the wheel when there’s no
xplicit typecasting is considered are an abomination in object-oriented programming. However, prudery won’t change the fact that casts are still a widely-used feature in C++ programming. Therefore, knowing exactly which
tandard C++ offers a rather limited number of functions for accurate time measurement: clock() gives you a granularity of up to a thousandth of a second at best, and difftime()
he new C++09 nullptr keyword designates an rvalue constant that serves as a universal null pointer literal, replacing the buggy and weakly-typed literal 0 and the infamous NULL macro. nullptr
ecause the scientific and engineering numeric floating-point calculation approximates real arithmetic, the precision of this format can create situations wherein your floating-point operations results are not acceptable in some domains.
orting C code to C++ is no big deal: change the source file’s extension from .c to .cpp and recompile. By contrast, porting C++ source code and binaries to C
rrors and exceptionsare two similar notions that differ in one crucial aspect: exceptions are a runtime concept, whereas errors are anomalous conditions that can and should be detected as early