File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ namespace plog
4545 };
4646
4747 template <class T >
48- struct isConvertibleToNString : isConvertible<T, std::basic_string<util::nchar> > {};
48+ struct isConvertibleToNString : isConvertible<T, util::nstring> {};
49+
50+ template <class T >
51+ struct isConvertibleToString : isConvertible<T, std::string> {};
4952
5053 template <class T >
5154 struct isContainer
@@ -129,12 +132,13 @@ namespace plog
129132 template <class T >
130133 inline typename meta::enableIf<meta::isConvertibleToNString<T>::value, void >::type operator <<(util::nostringstream& stream, const T& data)
131134 {
132- plog::detail::operator <<(stream, static_cast <std::basic_string< util::nchar> >(data));
135+ plog::detail::operator <<(stream, static_cast <util::nstring >(data));
133136 }
134137
135138 // Print std containers
136139 template <class T >
137- inline typename meta::enableIf<meta::isContainer<T>::value && !meta::isConvertibleToNString<T>::value, void >::type operator <<(util::nostringstream& stream, const T& data)
140+ inline typename meta::enableIf<meta::isContainer<T>::value && !meta::isConvertibleToNString<T>::value && !meta::isConvertibleToString<T>::value, void >::type
141+ operator <<(util::nostringstream& stream, const T& data)
138142 {
139143 stream << " [" ;
140144
You can’t perform that action at this time.
0 commit comments