Changed clang formatting for templates

This commit is contained in:
gabime
2018-03-16 17:13:50 +02:00
parent f4ce52d206
commit 5afb5dc782
29 changed files with 291 additions and 288 deletions

View File

@@ -24,6 +24,12 @@ void err_handler_example();
namespace spd = spdlog;
int main(int, char *[])
{
fmt::MemoryWriter w;
w.write("HELLO", 10);
std::string s(w.data(), w.size());
std::cout << s << std::endl;
return 0;
try
{
// Console logger with color
@@ -133,7 +139,7 @@ void android_example()
struct my_type
{
int i;
template <typename OStream> friend OStream &operator<<(OStream &os, const my_type &c)
template<typename OStream> friend OStream &operator<<(OStream &os, const my_type &c)
{
return os << "[my_type i=" << c.i << "]";
}

View File

@@ -133,7 +133,7 @@ void android_example()
struct my_type
{
int i;
template <typename OStream> friend OStream &operator<<(OStream &os, const my_type &c)
template<typename OStream> friend OStream &operator<<(OStream &os, const my_type &c)
{
return os << "[my_type i=" << c.i << "]";
}

View File

@@ -11,7 +11,7 @@
namespace utils {
template <typename T> inline std::string format(const T &value)
template<typename T> inline std::string format(const T &value)
{
static std::locale loc("");
std::stringstream ss;
@@ -20,7 +20,7 @@ template <typename T> inline std::string format(const T &value)
return ss.str();
}
template <> inline std::string format(const double &value)
template<> inline std::string format(const double &value)
{
static std::locale loc("");
std::stringstream ss;