diff --git a/src/c_wrapper/clhelper.h b/src/c_wrapper/clhelper.h
index 5285be8d3a562cabcc4310efed4cc0e7f5f784b2..17962280f2a645112cf7259d6eacf9f69738a896 100644
--- a/src/c_wrapper/clhelper.h
+++ b/src/c_wrapper/clhelper.h
@@ -190,9 +190,8 @@ public:
             call_guarded_cleanup(m_release, m_name, m_clobj);
         }
     }
-    template<bool out>
     PYOPENCL_INLINE void
-    print(std::ostream &stm)
+    print(std::ostream &stm, bool out=false)
     {
         if (!out) {
             stm << &m_clobj;
diff --git a/src/c_wrapper/clobj.h b/src/c_wrapper/clobj.h
index 4846f26f0cbf9319e235e169608a2589224de7f0..82cb45be8280f18de82f850ec44639c20578099b 100644
--- a/src/c_wrapper/clobj.h
+++ b/src/c_wrapper/clobj.h
@@ -67,7 +67,6 @@ public:
     {
         return m_obj.data();
     }
-    template<bool>
     PYOPENCL_INLINE void
     print(std::ostream &stm)
     {
@@ -91,7 +90,6 @@ public:
     {
         return m_obj->data();
     }
-    template<bool>
     PYOPENCL_INLINE void
     print(std::ostream &stm)
     {
diff --git a/src/c_wrapper/error.h b/src/c_wrapper/error.h
index f59c1e13fe12ec3185f65a9e9a692bbb0e873413..dfcef093d0e7acf4517bdc8911a2124615e46daa 100644
--- a/src/c_wrapper/error.h
+++ b/src/c_wrapper/error.h
@@ -111,7 +111,7 @@ struct __CLPrintOut<T, typename std::enable_if<
     static PYOPENCL_INLINE void
     call(T v, std::ostream &stm)
     {
-        v.template print<true>(stm);
+        v.print(stm, true);
         stm << ", ";
     }
 };
@@ -121,7 +121,7 @@ struct __CLPrint {
     static PYOPENCL_INLINE void
     call(T v, std::ostream &stm)
     {
-        v.template print<false>(stm);
+        v.print(stm);
         stm << ", ";
     }
 };
diff --git a/src/c_wrapper/utils.h b/src/c_wrapper/utils.h
index bc4ecc447797fdf52f8a4b3e7cb6898d7908da58..ddb45bf9847bc67c3df4ddec57cb7b7d40fa5225 100644
--- a/src/c_wrapper/utils.h
+++ b/src/c_wrapper/utils.h
@@ -30,19 +30,19 @@ tostring(const T& v)
 namespace pyopencl {
 
 // TODO
-template<typename T, bool, class = void>
+template<typename T, class = void>
 struct CLGenericArgPrinter {
     static PYOPENCL_INLINE void
-    print(std::ostream &stm, T &arg)
+    print(std::ostream &stm, T &arg, bool)
     {
         stm << arg;
     }
 };
 
-template<bool out>
-struct CLGenericArgPrinter<std::nullptr_t, out, void> {
+template<>
+struct CLGenericArgPrinter<std::nullptr_t, void> {
     static PYOPENCL_INLINE void
-    print(std::ostream &stm, std::nullptr_t&)
+    print(std::ostream &stm, std::nullptr_t&, bool)
     {
         stm << (void*)nullptr;
     }
@@ -70,11 +70,10 @@ public:
     {
         return m_arg;
     }
-    template<bool out>
     PYOPENCL_INLINE void
-    print(std::ostream &stm)
+    print(std::ostream &stm, bool out=false)
     {
-        CLGenericArgPrinter<T, out>::print(stm, m_arg);
+        CLGenericArgPrinter<T>::print(stm, m_arg, out);
     }
 };
 
@@ -229,9 +228,8 @@ public:
     {
         return _ArgBufferConverter<Buff>::convert(m_buff);
     }
-    template<bool out>
     PYOPENCL_INLINE void
-    print(std::ostream &stm)
+    print(std::ostream &stm, bool out=false)
     {
         _print_buf(stm, m_buff, Buff::arg_type, out || !is_out);
     }
@@ -274,9 +272,8 @@ public:
     {
         return m_t;
     }
-    template<bool out>
     PYOPENCL_INLINE void
-    print(std::ostream &stm)
+    print(std::ostream &stm, bool out=false)
     {
         if (!out) {
             stm << m_t;
@@ -335,11 +332,10 @@ public:
             m_arg.cleanup(m_converted);
         }
     }
-    template<bool out>
     PYOPENCL_INLINE void
-    print(std::ostream &stm)
+    print(std::ostream &stm, bool out=false)
     {
-        m_arg.template print<out>(stm);
+        m_arg.print(stm, out);
     }
 };
 
@@ -409,9 +405,8 @@ public:
     {
         return std::make_tuple(m_buff.len(), m_buff.get());
     }
-    template<bool out>
     PYOPENCL_INLINE void
-    print(std::ostream &stm)
+    print(std::ostream &stm, bool out=false)
     {
         _print_buf(stm, m_buff, ArgType::Length, out || !is_out);
     }