summaryrefslogtreecommitdiff
path: root/src/util/safe_print.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-10-21 19:32:08 -0500
committerGitHub <noreply@github.com>2021-10-21 19:32:08 -0500
commit81d4a2a0e337e341ac1373de0be8762617372ffc (patch)
treeeec38cb65373f9df09fde442fc69bd2088f7d005 /src/util/safe_print.h
parent638c0bfdc798116925f839118dffd86581a58d43 (diff)
parentf9de5395d78bc5338ca800e539e91795730cbd29 (diff)
Merge branch 'master' into fixErrorSetfixErrorSet
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