summaryrefslogtreecommitdiff
path: root/indra/test
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test')
-rw-r--r--indra/test/namedtempfile.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h
index df7495fc13..acfc048b7a 100644
--- a/indra/test/namedtempfile.h
+++ b/indra/test/namedtempfile.h
@@ -38,6 +38,15 @@ public:
createFile(pfx, [&content](std::ostream& out){ out << content; }, sfx);
}
+ // Disambiguate when passing string literal -- unclear why a string
+ // literal should be ambiguous wrt std::string_view and Streamer
+ NamedTempFile(const std::string_view& pfx,
+ const char* content,
+ const std::string_view& sfx=std::string_view(""))
+ {
+ createFile(pfx, [&content](std::ostream& out){ out << content; }, sfx);
+ }
+
// Function that accepts an ostream ref and (presumably) writes stuff to
// it, e.g.:
// (boost::phoenix::placeholders::arg1 << "the value is " << 17 << '\n')
@@ -99,6 +108,11 @@ public:
NamedTempFile(remove_dot(ext), content, ensure_dot(ext))
{}
+ // Disambiguate when passing string literal
+ NamedExtTempFile(const std::string& ext, const char* content):
+ NamedTempFile(remove_dot(ext), content, ensure_dot(ext))
+ {}
+
NamedExtTempFile(const std::string& ext, const Streamer& func):
NamedTempFile(remove_dot(ext), func, ensure_dot(ext))
{}