Teacher Teacher - STL Source Code Analysis - Doubt III in the book

zhaozj2021-02-11  169

Teacher Teacher - STL Source Code Analysis - Doubt III in the book

Foreword

I am watching Houjie's STL source code profile "Chapter 2 2.2 Sub-allocation" SGI Space Configurator (page 47) Seeing the following code, I think it is wrong.

SGI spatial configuration device original

......

The SGI spatial configuration device is different, and also different from the standard specifications, its name is alloc, but does not receive any quotes. In other words, if you want to understand the SGI spatial configurator in the program, you cannot use standard ways.

Vector > iv; // in vc or cb

Must be written:

Vector iv; // in gcc

......

The above is an excerpt of the original text, I personally think the statement:

Vector > iv; // in vc or cb

Std :: allocate does not exist, but should be std :: allocator. So it should be changed

Vector > iv; // in vc or cb

This may be a note of Teacher Hou, but this does not mean that I said, Mr. Hou must be written. I just wrote my personal opinion, it is very likely that I am wrong (learning is not a fine), please criticize advice and make progress together! If you can get the teacher's pointing, it is better to be better. ^ _ ^.

In short, please have a lot of criticism to believe to ccplusplus@21cn.com.

Acknowledgments!

Yuan Xiakai

2001-11-14

转载请注明原文地址:https://www.9cbs.com/read-5578.html

New Post(0)