help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unique identifiers for guard macros


From: Angel Tsankov
Subject: Re: unique identifiers for guard macros
Date: Thu, 6 Apr 2006 00:19:14 +0300

Can someone recommend a way to create "unique" identifiers for use in guard macros:

#if !defined (UNIQUE_GUARD)
#define UNIQUE_GUARD
...
#endif //!defined UNIQUE_GUARD

In VC6 MS tacked a GUID onto the end of the include guard e.g.

#if !defined(FILE_H_INSERT_128_BIT_GUID_HERE)

but in VC7 and later they came up with #pragma once.

If you do any MS/COM programming, or (I think) CORBA programming, you should have a GUID generator.

Using GUIDs is a good suggestion, but does one exist for Linux?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]