mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
ES.34: use the previously declared "const char * is"
This commit is contained in:
parent
b5adbd2564
commit
b43874936f
|
@ -11491,7 +11491,7 @@ Requires messy cast-and-macro-laden code to get working right.
|
|||
error(7, "this", "is", "an", "error"); // crash
|
||||
const char* is = "is";
|
||||
string an = "an";
|
||||
error(7, "this", "is", an, "error"); // crash
|
||||
error(7, "this", is, an, "error"); // crash
|
||||
}
|
||||
|
||||
**Alternative**: Overloading. Templates. Variadic templates.
|
||||
|
|
Loading…
Reference in New Issue
Block a user