diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e6d9e..fd129ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file. Credits to Dr. Cezary Śliwa for providing the patch. - Whenever possible, use compiler intrinsics to speed up complex bit manipulation operations (``popcount``, ``tzcount``, ``pdep``, ``pext``). +- Change base type of ``spin_component`` to the 1-byte wide ``std::uint8_t``. - New CMake option ``CPPCHECK_EXTRA_FLAGS``. It can be used to pass additional command line flags to ``cppcheck``. diff --git a/doc/expression/generator.rst b/doc/expression/generator.rst index 1fa9006..f55928e 100644 --- a/doc/expression/generator.rst +++ b/doc/expression/generator.rst @@ -462,7 +462,7 @@ In other words, - Among operators with the same :math:`S` and index sequence, :math:`S_+` comes first followed by :math:`S_-` and eventually by :math:`S_z`. -.. enum:: spin_component : int +.. enum:: spin_component : std::uint8_t Component of spin operator. diff --git a/include/libcommute/expression/generator_spin.hpp b/include/libcommute/expression/generator_spin.hpp index 976d996..770c6a1 100644 --- a/include/libcommute/expression/generator_spin.hpp +++ b/include/libcommute/expression/generator_spin.hpp @@ -32,7 +32,7 @@ namespace libcommute { // // S_+, S_- or S_z -enum spin_component : int { plus = 0, minus = 1, z = 2 }; +enum spin_component : std::uint8_t { plus = 0, minus = 1, z = 2 }; template class generator_spin : public generator {