diff --git a/src/largest.h b/src/largest.h index 9eae7abd..bb4ddce9 100644 --- a/src/largest.h +++ b/src/largest.h @@ -38,24 +38,24 @@ SOFTWARE. namespace etl { - //*************************************************************************** - /// Template to determine the largest type and size. + //*************************************************************************** + /// Template to determine the largest type and size. /// Supports up to 16 types. - /// Defines 'value_type' which is the type of the largest parameter. - /// Defines 'size' which is the size of the largest parameter. + /// Defines 'value_type' which is the type of the largest parameter. + /// Defines 'size' which is the size of the largest parameter. ///\ingroup largest - //*************************************************************************** - template - struct largest_type - { - private: + //*************************************************************************** + template + struct largest_type + { + private: // Declaration. - template - struct choose_type; + template + struct choose_type; // Specialisation for 'true'. // Defines 'type' as 'TrueType'. @@ -65,49 +65,49 @@ namespace etl typedef TrueType type; }; - // Specialisation for 'false'. + // Specialisation for 'false'. // Defines 'type' as 'FalseType'. template struct choose_type - { + { typedef FalseType type; - }; + }; - public: + public: - // Define 'largest_other' as 'largest_type' with all but the first parameter. - typedef typename largest_type::type largest_other; + // Define 'largest_other' as 'largest_type' with all but the first parameter. + typedef typename largest_type::type largest_other; - // Set 'type' to be the largest of the first parameter and any of the others. + // Set 'type' to be the largest of the first parameter and any of the others. // This is recursive. typedef typename choose_type<(sizeof(T1) > sizeof(largest_other)), // Boolean - T1, // TrueType - largest_other> // FalseType - ::type type; // The largest type of the two. + T1, // TrueType + largest_other> // FalseType + ::type type; // The largest type of the two. - // The size of the largest type. - enum - { - size = sizeof(type) - }; - }; + // The size of the largest type. + enum + { + size = sizeof(type) + }; + }; //*************************************************************************** - // Specialisation for one template parameter. - //*************************************************************************** - template - struct largest_type - { - typedef T1 type; + // Specialisation for one template parameter. + //*************************************************************************** + template + struct largest_type + { + typedef T1 type; - enum - { - size = sizeof(type) - }; - }; + enum + { + size = sizeof(type) + }; + }; //*************************************************************************** /// Template to determine the largest alignment.