================
@@ -363,3 +363,23 @@ std::string
 my_function() {
   return handle_or_string();
 }
+
+
+namespace TemplatedFunctions {
+template <typename MojoType>
+extern std::string GetErrorString(const MojoType& mojo_type);
+
+class A{};
+class B{};
+
+template <>
+std::string GetErrorString(const A& a) {
+  return "Can be string_view";
+}
+
+template <>
+std::string GetErrorString(const B& a) {
+  std::string s("Cannot be string_view");
+  return s;
+}
+}
----------------
EugeneZelenko wrote:

```suggestion
} // namespace TemplatedFunctions
```

https://github.com/llvm/llvm-project/pull/172170
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to