Effective STL: 50 Specific Ways to Improve Your Use of the by Scott Meyers

By Scott Meyers

C++’s normal Template Library is innovative, yet studying to exploit it good has continuously been a problem. in the past. during this publication, best-selling writer Scott Meyers ( potent C++ , and more suitable C++ ) unearths the severe ideas of thumb hired by means of the specialists – the issues they ordinarily do or typically steer clear of doing – to get the main out of the library.

Other books describe what’s within the STL. powerful STL indicates you ways to take advantage of it. all of the book’s 50 directions is sponsored via Meyers’ mythical research and incisive examples, so you’ll study not just what to do, but additionally while to do it – and why.

Highlights of powerful STL include:

* recommendation on deciding on between usual STL bins (like vector and list), nonstandard STL packing containers (like hash_set and hash_map), and non-STL bins (like bitset).
* suggestions to maximise the potency of the STL and the courses that use it.
* Insights into the habit of iterators, functionality gadgets, and allocators, together with belongings you usually are not do.
* information for the correct use of algorithms and member services whose names are an analogous (e.g., find), yet whose activities fluctuate in sophisticated (but very important) ways.
* Discussions of strength portability difficulties, together with ordinary how you can stay away from them.

Like Meyers’ past books, powerful STL is full of confirmed knowledge that comes purely from adventure. Its transparent, concise, penetrating sort makes it an important source for each STL programmer.

Show description

Read Online or Download Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library PDF

Best software books

Numerical Methods and Software Tools in Industrial Mathematics

Thirteen. 2 summary Saddle aspect difficulties . 282 thirteen. three Preconditioned Iterative equipment . 283 thirteen. four Examples of Saddle element difficulties 286 thirteen. five Discretizations of Saddle element difficulties. 290 thirteen. 6 Numerical effects . . . . . . . . . . . . . 295 III GEOMETRIC MODELLING 299 14 floor Modelling from Scattered Geological info 301 N.

Software Synthesis from Dataflow Graphs

Software program Synthesis from Dataflow Graphs addresses the matter of producing effective software program implementations from functions unique as synchronous dataflow graphs for programmable electronic sign processors (DSPs) utilized in embedded actual- time platforms. the appearance of high-speed photos workstations has made possible using graphical block diagram programming environments by means of designers of sign processing platforms.

Foundations of Software Science and Computation Structures: Second International Conference, FOSSACS’99 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS’99 Amsterdam, The Netherlands,March 22–28, 1999 Proceedings

This e-book constitutes the refereed complaints of the second one overseas convention on Foundations of software program technological know-how and Computation buildings, FOSSACS '99, held in Amsterdam, The Netherlands in March 1999 as a part of ETAPS'99. The 18 revised complete papers provided have been conscientiously chosen from a complete of forty submissions.

Software for Computer Control 1986. Proceedings of the 2nd IFAC Workshop, Lund, Sweden, 1–3 July 1986

This quantity reports the advances of software program for pcs, their improvement, functions and administration. subject matters coated comprise software program undertaking administration, actual time languages and their makes use of, and desktop aided layout concepts. The ebook additionally discusses how some distance synthetic intelligence is built-in with enterprise and to provide a whole review of the position of computers this day

Additional resources for Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library

Example text

This program, named qei, allows a user to type an expression and see the result of its evaluation. Successive expressions accumulate and results are assigned to variables so that previous results can be used in subsequent computations. At the > prompt, an expression can be entered, followed by a semicolon and a return. ) The computation is then performed and the result is shown as an assignment to a variable, starting with r1_ and continuing with r2_, r3_, and so on. Here is an example of a simple interaction.

This is done automatically by operations such as i + j, in which the values of i and j are used in the computation. On the other hand, values are not obtained from variables unless they are needed. For example, the expression x | y generates the variables x and y, so that every (x | y) := 0 assigns 0 to both x and y. The if-then-else and case control expressions also produce variables if the selected expression does. The term result is used collectively to include both values and variables. Consequently, it is best to describe expr1 | expr2 as generating the results of expr1 followed by the results of expr2.

For example, 0|1 generates 0 and 1. Thus, in if i = (0 | 1) then write("okay") okay is written if the value of i is either 0 or 1. The arguments in an alternation expression may themselves be generators. For example, (1 to 3) | (3 to 1 by –1) generates 1, 2, 3, 3, 2, 1. When alternation is used in goal-directed evaluation, such as if i = (0 | 1) then write(i) it reads naturally as “if i is equal to 0 or 1, then …”. On the other hand, if alternation is used in iteration, as in every i := (0 | 1) do write(i) it reads more naturally as “i is assigned 0 then 1”.

Download PDF sample

Rated 4.48 of 5 – based on 10 votes