aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 03:04:33 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 03:04:33 +0000
commit7b7e1d8e174500155f0073512ab86fa50bfe247b (patch)
tree9c8c14ba80c6f6b3d2b410b93f788f650ecac1e0
parent86f214391dbef1cebfff0b3bcd9e9609ada0bfc8 (diff)
downloadpaludis-7b7e1d8e174500155f0073512ab86fa50bfe247b.tar.gz
paludis-7b7e1d8e174500155f0073512ab86fa50bfe247b.tar.xz
Catch attempts to stringify a CountedPtr at compile or link time.
-rw-r--r--paludis/stringify.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/paludis/stringify.hh b/paludis/stringify.hh
index 82b38cc..7c0c7a2 100644
--- a/paludis/stringify.hh
+++ b/paludis/stringify.hh
@@ -86,6 +86,18 @@ namespace paludis
void
stringify(const T_ * const item);
+ template <typename T_, typename U_, typename V_>
+ class CountedPtr;
+
+ /**
+ * Convert item to a string (undefined overload for counted
+ * pointers, to catch screwups at compiletime rather than printing
+ * out addresses in weird places because of a missing *).
+ */
+ template <typename T_, typename U_, typename V_>
+ void
+ stringify(const CountedPtr<T_, U_, V_> & item);
+
/**
* Convert item to a string (overload for char *, which isn't a
* screwup like other pointers).