summaryrefslogtreecommitdiff
path: root/src/util/safe_print.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/safe_print.h')
-rw-r--r--src/util/safe_print.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/util/safe_print.h b/src/util/safe_print.h
index e3280bb55..0bc2b0599 100644
--- a/src/util/safe_print.h
+++ b/src/util/safe_print.h
@@ -47,12 +47,17 @@
namespace cvc5 {
+template <size_t N>
+void CVC5_EXPORT safe_print(int fd, const char (&msg)[N]);
+template <typename T>
+void CVC5_EXPORT safe_print(int fd, const T& obj);
+
/**
* Prints arrays of chars (e.g. string literals) of length N. Safe to use in a
* signal handler.
*/
template <size_t N>
-void CVC5_EXPORT safe_print(int fd, const char (&msg)[N])
+void safe_print(int fd, const char (&msg)[N])
{
ssize_t nb = N - 1;
if (write(fd, msg, nb) != nb) {
@@ -96,7 +101,7 @@ auto toStringImpl(const T& obj, int) -> decltype(toString(obj))
* @param obj The object to print
*/
template <typename T>
-void CVC5_EXPORT safe_print(int fd, const T& obj)
+void safe_print(int fd, const T& obj)
{
const char* s =
toStringImpl(obj, /* prefer the method that uses `toString()` */ 0);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback