Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2007-08-16 11:29:11
Size: 557
Editor: mpiat1403
Comment: Purify Globals.h and other header files according to Stroustup 9.2.1!
Revision 3 as of 2007-08-27 09:05:55
Size: 814
Editor: mpiat1403
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Globals.h includes everything that is needed nearly everywhere, e.g., std::vector, std::string, std::ostringstream, etc. This is useful for rapid prototyping. Since also `using` declarations appear in Globals.h, non-predictable side effects show up in code that includes a header that, in turn, includes Globals.h somehow. For example, the identifier `vector` is already defined. Globals.h should be purified. Stroustrup 9.2.1 gives an explicit list of what should be used in a header file and what not. (`using` declarations do not show up in this list.) Globals.h includes everything that is needed nearly everywhere, e.g., std::vector, std::string, std::ostringstream, etc. This is useful for rapid prototyping. Since also using directives (`using namespace std`) and using declarations (`using std::vector`) appear in Globals.h, non-predictable side effects show up in code that includes a header that, in turn, includes Globals.h somehow. For example, the identifier `vector` is already defined. Globals.h should be purified. Stroustrup 9.2.1 gives an explicit list of what should be used in a header file and what not. (`using` declarations do not show up in this list.)

Replace using directives by using declarations, see http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5


Rename <collection_name>.docs to <collection_name>.docs_ascii.

Globals.h includes everything that is needed nearly everywhere, e.g., std::vector, std::string, std::ostringstream, etc. This is useful for rapid prototyping. Since also using directives (using namespace std) and using declarations (using std::vector) appear in Globals.h, non-predictable side effects show up in code that includes a header that, in turn, includes Globals.h somehow. For example, the identifier vector is already defined. Globals.h should be purified. Stroustrup 9.2.1 gives an explicit list of what should be used in a header file and what not. (using declarations do not show up in this list.)

Replace using directives by using declarations, see http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5

Rename <collection_name>.docs to <collection_name>.docs_ascii.

CompleteSearch: completesearch/TODO (last edited 2007-08-27 09:05:55 by mpiat1403)