about macro definition

H

hpsoar

Now I'm reading a book, which annotated the sgi stl. And I found the
names of macros often starts with two underline, such as
__STL_CONFIG_H, I wonder why so, and why not start with only one like
_STL_CONFIG_H
 
A

Alf P. Steinbach

* hpsoar:
Now I'm reading a book, which annotated the sgi stl. And I found the
names of macros often starts with two underline, such as
__STL_CONFIG_H, I wonder why so, and why not start with only one like
_STL_CONFIG_H

Both forms are reserved to the implementation (of standard library), so it
doesn't matter. It's just a choice they made for whatever reason. An ordinary
C++ program or library should *never* use such reserved name forms, so,
absolutely do not emulate what they do, because that code operatoes under very
different conditions and rules than your code does.


Cheers & hth.,

- Alf
 
H

hpsoar

* hpsoar:


Both forms are reserved to the implementation (of standard library), so it
doesn't matter. It's just a choice they made for whatever reason. An ordinary
C++ program or library should *never* use such reserved name forms, so,
absolutely do not emulate what they do, because that code operatoes under very
different conditions and rules than your code does.

Cheers & hth.,

- Alf

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,186
Latest member
vinaykumar_nevatia

Latest Threads

Top