Commit a7ad5aba authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added Increment type to MeshDimensionsTag

This will be useful for specializations in the subentity layer.
parent 8b5cc911
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -40,21 +40,22 @@ namespace Meshes {
template< int Dimension >
class MeshDimensionTag
{
   public:

      static const int value = Dimension;
   static_assert( Dimensions >= 0, "The value of the dimensions cannot be negative." );

      typedef MeshDimensionTag< Dimension - 1 > Decrement;
public:
   static constexpr int value = Dimensions;

      static_assert( value >= 0, "The value of the dimensions cannot be negative." );
   using Decrement = MeshDimensionsTag< Dimensions - 1 >;
   using Increment = MeshDimensionsTag< Dimensions + 1 >;
};

template<>
class MeshDimensionTag< 0 >
{
public:
 
   static const int value = 0;

   using Increment = MeshDimensionsTag< 1 >;
};

} // namespace Meshes