diff --git a/llvm/docs/CodingStandards.html b/llvm/docs/CodingStandards.html index 1c9c14517557..0aab5c7b671e 100644 --- a/llvm/docs/CodingStandards.html +++ b/llvm/docs/CodingStandards.html @@ -379,9 +379,8 @@ code, isolate it behind a well defined (and well documented) interface.
In practice, this means that you shouldn't assume much about the host compiler, including its support for "high tech" features like partial -specialization of templates. In fact, Visual C++ 6 could be an important target -for our work in the future, and we don't want to have to rewrite all of our code -to support it.
+specialization of templates. If these features are used, they should only be +an implementation detail of a library which has a simple exposed API. @@ -526,67 +525,9 @@ library. There are two problems with this: example) is allowed normally, it is just <iostream> that is causing problems. -Old Way | -New Way | -
---|---|
#include <iostream> |
- #include "llvm/Support/Streams.h" |
-
DEBUG(std::cerr << ...); -DEBUG(dump(std::cerr)); |
- DOUT << ...; -DEBUG(dump(DOUT)); |
-
std::cerr << "Hello world\n"; |
- llvm::cerr << "Hello world\n"; |
-
std::cout << "Hello world\n"; |
- llvm::cout << "Hello world\n"; |
-
std::cin >> Var; |
- llvm::cin >> Var; |
-
std::ostream |
- llvm::OStream |
-
std::istream |
- llvm::IStream |
-
std::stringstream |
- llvm::StringStream |
-
void print(std::ostream &Out); -// ... -print(std::cerr); |
- void print(llvm::OStream Out);1 -// ... -print(llvm::cerr); - |
-
Notes:
- -The preferred replacement for stream functionality is the +raw_ostream class (for writing to output streams of various sorts) and +the MemoryBuffer API (for reading in files).