mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +03:00
ES.34: use the previously declared "const char * is"
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user