Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1891)

Unified Diff: base/strings/safe_sprintf.h

Issue 107173002: Use non C++11 version of SafeSNPrintf() when building with gcc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/safe_sprintf.h
diff --git a/base/strings/safe_sprintf.h b/base/strings/safe_sprintf.h
index a1be047955c191fc07ce1835c062f8c45cbfe19e..e27429fc0e83ce3ac6d18a28cb1b565b466720b9 100644
--- a/base/strings/safe_sprintf.h
+++ b/base/strings/safe_sprintf.h
@@ -190,7 +190,9 @@ BASE_EXPORT size_t GetSafeSPrintfSSizeMaxForTest();
} // namespace internal
-#if __cplusplus >= 201103 // C++11
Nico 2013/12/05 21:11:35 Huh where did that come from? We should probably d
Inactive 2013/12/05 21:15:15 Hmm. This is a bit more readable than the non-C++1
+#if __cplusplus >= 201103 && !defined(COMPILER_GCC) // C++11
+
+// The following does not build with gcc yet.
template<typename... Args>
ssize_t SafeSNPrintf(char* buf, size_t N, const char* fmt, Args... args) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698