summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-12-04 19:27:28 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2020-12-04 19:27:28 +0000
commit1111a8b005308087101daf7facabfee1a473d420 (patch)
tree802aaf19c7c0e64223296bbc0efd3e2f455d3fc2
parentAdd lock around check - thread-sanitizer fix (diff)
downloadlibadhocutil-1111a8b005308087101daf7facabfee1a473d420.tar.bz2
libadhocutil-1111a8b005308087101daf7facabfee1a473d420.tar.xz
libadhocutil-1111a8b005308087101daf7facabfee1a473d420.zip
Better detection first param is a stream
Also works around weirdness with ubsan
-rw-r--r--libadhocutil/compileTimeFormatter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h
index 1d47ef7..b454863 100644
--- a/libadhocutil/compileTimeFormatter.h
+++ b/libadhocutil/compileTimeFormatter.h
@@ -207,7 +207,7 @@ namespace AdHoc {
* @return the stream.
*/
template<typename stream, typename... Pn>
- inline typename std::enable_if<(bool)&stream::write, stream>::type &
+ inline typename std::enable_if<std::is_base_of_v<std::basic_ostream<char_type>, stream>, stream>::type &
operator()(stream & s, const Pn &... pn) const
{
return write(s, pn...);