summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-06-17 18:10:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-06-17 18:10:47 +0100
commit34fc123de389c46a1ff806109312ff40c4c70acd (patch)
tree2f4bf9f90288b9b3dc15d83edfa04eaac3178a40
parentLorem Ipsum test (diff)
downloadlibadhocutil-34fc123de389c46a1ff806109312ff40c4c70acd.tar.bz2
libadhocutil-34fc123de389c46a1ff806109312ff40c4c70acd.tar.xz
libadhocutil-34fc123de389c46a1ff806109312ff40c4c70acd.zip
Create a typedef for the formatters char type
-rw-r--r--libadhocutil/compileTimeFormatter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h
index 4097ce5..f409b1c 100644
--- a/libadhocutil/compileTimeFormatter.h
+++ b/libadhocutil/compileTimeFormatter.h
@@ -99,6 +99,7 @@ namespace AdHoc {
template<const auto &, auto, auto, typename> friend struct StreamWriterBase;
public:
+ typedef typename std::decay<decltype(*S)>::type char_type;
/**
* Get a string containing the result of formatting.
* @param pn the format arguments.
@@ -107,7 +108,7 @@ namespace AdHoc {
template<typename ... Pn>
static inline auto get(const Pn & ... pn)
{
- std::basic_stringstream<typename std::decay<decltype(*S)>::type> s;
+ std::basic_stringstream<char_type> s;
return write(s, pn...).str();
}