0

the c standard template library pj plauger pdf

Standard Template Library

Standard Template Library

Kỹ thuật lập trình

... typeGeneric algorithms act on objects in containers Iterators provide access to objects in the containers yet hide the internal structure of the container Slide 18- 17Copyright â 2007 ... beyond the of the container. c. front( ); // returns the first element in the // container (same as *c. begin( );) c. back( ); //returns the last element in the container // same as *( c. end( ... Addison-WesleyMore Common Container Members c. swap(other_container); // swaps contents of // c and other_container. c. push_back(item); // appends item to container c  c. begin( ); // returns...
  • 56
  • 447
  • 0
The New C Standard- P8

The New C Standard- P8

Kỹ thuật lập trình

... perhaps explicitly, make cost/accuracy trade-offs when working with source code. These trade-offs also0 cost/accuracytrade-offoccur in their interaction with identifiers.1.4 Visual word recognitionThis ... pronunciationcan change or the concept it denotes can be replaced by another word. An identifier, once declared in the source, rarely has its spelling modified. The cognitive demands of a particular ... provided by all of the constructs in which they occur, including:ãA declaration (which may include an associated comment) provides information on the type, scope,and various other attributes....
  • 100
  • 427
  • 0
The New C Standard- P9

The New C Standard- P9

Kỹ thuật lập trình

... what the standard calls a decimal constant, which corresponds to the common case.When they occur in source, both octal and hexadecimal constants are usually referred to by these names,respectively. ... calls C0 and C1 ). Most of the UCNs with values less than 00A0 represent characters in the basicsource character set. The exceptions listed enumerate characters that are in the Ascii character set, ... a recommended practice. C9 0Recommended practices are new in C9 9, as are hexadecimal floating constants. C ++ The C ++ Standard does not specify support for hexadecimal floating constants.Coding...
  • 100
  • 301
  • 0
The New C Standard- P10

The New C Standard- P10

Kỹ thuật lập trình

... objects. Its usage also specifies the type of the allocated object. The C library is also included in the C ++ Standard, providing access to the mallocandcalloc library functions (which do not contain ... caches to their processors. In some cases there can be an on-chip cache and ancache 0off-chip cache, the former being smaller but faster (and more expensive) than the latter.ãProcessors can ... }959For all other accesses to an object having no declared type, the effective type of the object is simply the typeeffective typelvalue used foraccessof the lvalue used for the access.CommentaryThis...
  • 100
  • 384
  • 0
The New C Standard- P11

The New C Standard- P11

Kỹ thuật lập trình

... integer constant. The C9 9 contexts in which the result is not an integerconstant all involve constructs that are new in C9 9. C ++Like C9 0, the C ++ Standard specifies that the result is a constant. ... recursive call, do not affect the value of the newly created object.1026 function callrecursiveStorage for the unnamed object is created on block entry. Executing a statement containing a compound1078 ... (int)-1may not occur in the visible source code, it could easily occur as the result of macro replacement of the operand of the sizeofoperator. This is one of the reasons behind the guideline recommendation...
  • 100
  • 309
  • 0
The New C Standard- P12

The New C Standard- P12

Kỹ thuật lập trình

... considered to be excessive. It wouldrequire the use of the memmove library function rather than the memcpy library function. C ++ The C ++ Standard requires (5.18p8) that the objects have the same type. ... difference may resultin values being accessed from registers in C9 0 while they will be accessed from storage in C9 9. C ++ The C ++ Standard explicitly specifies the behavior for creating a composite ... operators affects the characteristics of the source that translator vendors expect to frequently0 source codecharacteristicsencounter (e.g., because developers are expected to writex*=3rather thanx=x*3)....
  • 100
  • 293
  • 0
The New C Standard- P13

The New C Standard- P13

Kỹ thuật lập trình

... than the subsequence definition in the same scope, C ++This form of declaration would not have the desired affect in C ++because the braces form a scope. The declaration ofs2would need to be completed ... principle of “cacheing”: under certain circumstances the compilercan remember the last value accessed (read or written) from a location, and use this retained value the nexttime that location ... into the same cache line. The affectcache 0may be that assumptions about cache line interaction, made when deciding what machine code to generate,are no longer true. The performance impact of...
  • 100
  • 415
  • 0
The New C Standard- P14

The New C Standard- P14

Kỹ thuật lập trình

... in C9 9. C ++ The concept of current object is new in C9 9 and is not specified in the C ++ Standard. It is not neededbecause the ordering of the initializer is specified (and the complications ... how the current object maps to the object being initialized. Some of this knowledge is encoded in the extensiveexamples provided in the Standard. C9 0 The concept of current object is new in C9 9. C ++ The ... Initialization1684 C9 0 The string literal case was not explicitly specified in the C9 0 Standard, but was added by the response to DR#060. C ++ The C ++ Standard specifies that objects having static storage...
  • 100
  • 359
  • 0
The New C Standard- P15

The New C Standard- P15

Kỹ thuật lập trình

... ofthese, control flow altering, instructions only. The kinds of instructions that change control flow are: conditional branches CB,unconditional branches UB, indirect procedure calls IC, procedure ... thatduplicate case constant expressions in the enclosing switch statement.)CommentaryThis specification (semantics in a Constraints clause) clarifies the interpretation to be given to the phrase “in the ... number of conditional branch instructions in the program image. Of the 17,565 static branch sites, 69 branches account for the execution of 50% of all dynamic conditional branches. Not all brancheswill...
  • 100
  • 436
  • 0
The New C Standard- P16

The New C Standard- P16

Kỹ thuật lập trình

... /proj/abc.h) on the identity of the current directory.gccsearches two directories,/usr/includeand another directory that holds very machine speci c files,such asstdarg.h(e.g.,/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/includeon ... simply follow the behavior described1898 #includeplaces to searchforby the following C sentence (which has the consequence of eventually checking these other places).1901If this search is not ... placemarker preprocessing tokenoccurs because the ## operator does not cross replacement boundaries. C9 0 The explicitly using the concept of a placemarker preprocessing token is new in C9 9. C ++The...
  • 112
  • 330
  • 0
Tài liệu The New C Standard- P1 docx

Tài liệu The New C Standard- P1 docx

Kỹ thuật lập trình

... such processor designs become available in commercially significant quantities they arenot considered further here.CachecacheA commonly used technique for bridging the significant performance ... Smith[1213]investigated correlations between constructs appearing in the sourcecode and execution time performance of benchmarks that included SPEC.6.2 Other benchmarks The SPEC CPU benchmarks had their origins ... be so small.8 Source code cost driversHaving source code occupy disk space rarely costs very much. The cost of ownership for source code iscoding guidelinescost driversincurred when it is...
  • 100
  • 404
  • 0
Tài liệu The New C Standard- P2 doc

Tài liệu The New C Standard- P2 doc

Kỹ thuật lập trình

... In fact assubjects’ confidence increased, the accuracy of the calibration of their own ability went down. Once they hadseen the question, and answered it, subjects were able to accurately calibrate ... in the selection of an objective or in the specification of the means to achieve it, irrespectiveof whether the actions directed by this decision-scheme run according to plan.Mistakes are further ... generally accepted theory of the root cause of cognitive effort. It isa recognized effect and developers’ reluctance to experience it is a factor in the specification some of the guideline recommendations.What...
  • 100
  • 333
  • 0

Xem thêm