File StrongType.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
template<typename T, typename Parameter>
class StrongType
#include <StrongType.h>

From: https://www.fluentcpp.com/2016/12/08/strong-types-for-strong-interfaces/.

Template Parameters
  • T: The underlying type.

  • Parameter: A “phantom type” serves the purpose of specializing the type.

Public Functions

constexpr StrongType(T const &value)

Copy Constructor.

constexpr StrongType(T &&value)

Move Constructor.

constexpr const T &get() const

Getter for the underlying base class.

Return

The value in its base from.

Private Members

T value_