summaryrefslogtreecommitdiff
path: root/elpa/irony-20220110.849/server/src/support/iomanip_quoted.h
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-06-07 08:23:47 -0400
committermattkae <mattkae@protonmail.com>2022-06-07 08:23:47 -0400
commitbd18a38c2898548a3664a9ddab9f79c84f2caf4a (patch)
tree95b9933376770381bd8859782ae763be81c2d72b /elpa/irony-20220110.849/server/src/support/iomanip_quoted.h
parentb07628dddf418d4f47b858e6c35fd3520fbaeed2 (diff)
parentef160dea332af4b4fe5e2717b962936c67e5fe9e (diff)
Merge conflict
Diffstat (limited to 'elpa/irony-20220110.849/server/src/support/iomanip_quoted.h')
-rw-r--r--elpa/irony-20220110.849/server/src/support/iomanip_quoted.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/elpa/irony-20220110.849/server/src/support/iomanip_quoted.h b/elpa/irony-20220110.849/server/src/support/iomanip_quoted.h
deleted file mode 100644
index a8ca38b..0000000
--- a/elpa/irony-20220110.849/server/src/support/iomanip_quoted.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**-*-C++-*-
- * \file
- * \brief Dumb implementation of something that might look like C++14
- * std::quoted.
- *
- * This file is distributed under the GNU General Public License. See
- * COPYING for details.
- */
-
-#ifndef IRONY_MODE_SERVER_SUPPORT_IOMANIP_QUOTED_H_
-#define IRONY_MODE_SERVER_SUPPORT_IOMANIP_QUOTED_H_
-
-#include <ostream>
-#include <string>
-
-namespace support {
-namespace detail {
-
-struct QuotedStringProxy {
- QuotedStringProxy(const std::string &s) : s(s) {
- }
-
- std::string s;
-};
-
-std::ostream &operator<<(std::ostream &os, const QuotedStringProxy &q) {
- const std::string &s = q.s;
-
- os << '"';
- if (s.find_first_of("\"\\") == std::string::npos) {
- os << s;
- } else {
- for (auto ch : s) {
- if (ch == '\\' || ch == '"')
- os << '\\';
-
- os << ch;
- }
- }
- os << '"';
- return os;
-}
-
-} // namespace detail
-
-detail::QuotedStringProxy quoted(const std::string &s) {
- return detail::QuotedStringProxy(s);
-}
-
-} // namespace support
-
-#endif // IRONY_MODE_SERVER_SUPPORT_IOMANIP_QUOTED_H_