summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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;