Automated style fixes in order to bring the code a little bit closer to compliance with MISRA C++ rules. No changes in logic.

This commit is contained in:
Pavel Kirienko
2014-03-25 03:04:36 +04:00
parent cce657e1fe
commit 0cc627016a
64 changed files with 777 additions and 283 deletions
+15 -9
View File
@@ -23,7 +23,7 @@ struct StaticAssert<true>
* Usage:
* ShowIntegerAsError<integer_expression>::foobar();
*/
template<long N> struct ShowIntegerAsError;
template <long N> struct ShowIntegerAsError;
/**
* Prevents copying when inherited
@@ -39,15 +39,21 @@ protected:
/**
* Compile time conditions
*/
template<bool B, typename T = void>
template <bool B, typename T = void>
struct EnableIf { };
template<typename T>
struct EnableIf<true, T> { typedef T Type; };
template <typename T>
struct EnableIf<true, T>
{
typedef T Type;
};
template<typename T, typename R = void>
struct EnableIfType { typedef R Type; };
template <typename T, typename R = void>
struct EnableIfType
{
typedef R Type;
};
template <bool Condition, typename TrueType, typename FalseType>
@@ -68,7 +74,7 @@ struct Select<false, TrueType, FalseType>
/**
* Value types
*/
template<bool> struct BooleanType { };
template <bool> struct BooleanType { };
typedef BooleanType<true> TrueType;
typedef BooleanType<false> FalseType;
@@ -102,14 +108,14 @@ template <typename To, typename From>
To try_implicit_cast(const From& from, const To& default_)
{
return TryImplicitCastImpl<From, To>::impl(from, default_,
BooleanType<IsImplicitlyConvertibleFromTo<From, To>::Result>());
BooleanType<IsImplicitlyConvertibleFromTo<From, To>::Result>());
}
template <typename To, typename From>
To try_implicit_cast(const From& from)
{
return TryImplicitCastImpl<From, To>::impl(from, To(),
BooleanType<IsImplicitlyConvertibleFromTo<From, To>::Result>());
BooleanType<IsImplicitlyConvertibleFromTo<From, To>::Result>());
}
}