summaryrefslogtreecommitdiff
path: root/include/inspircd.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-09 01:36:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-09 01:36:51 +0000
commit525b7e3409884946cde5ddd6b0e8180e668032a3 (patch)
treefbda7d60811a0dbf7c12b04f57f1caf8e8f51283 /include/inspircd.h
parent8ac4e727cc212fd9eb96f8394e0860fa90ceb213 (diff)
This is a bit better
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6274 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/inspircd.h')
-rw-r--r--include/inspircd.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index efd5a898b..5e9bed45d 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -80,21 +80,31 @@ template<typename N> std::string ConvNumeric(N in)
return std::reverse(res,out);
}
-template <typename T> inline std::string ConvToStr(const int in)
+template <int> inline std::string ConvToStr(const int in)
{
return ConvNumeric(in);
}
-template <typename T> inline std::string ConvToStr(const long in)
+template <long> inline std::string ConvToStr(const long in)
{
return ConvNumeric(in);
}
-template <typename T> inline std::string ConvToStr(const unsigned long in)
+template <unsigned long> inline std::string ConvToStr(const unsigned long in)
{
return ConvNumeric(in);
}
+template <const char*> inline std::string ConvToStr(const char* in)
+{
+ return in;
+}
+
+template <bool> inline std::string ConvToStr(const long in)
+{
+ return (in ? "1" : "0");
+}
+
template <typename T> inline std::string ConvToStr(const T &in)
{
std::stringstream tmp;