Skip to content

Commit

Permalink
fix in types.hpp (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco authored Aug 14, 2023
1 parent 9469fc3 commit efaf7cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Pre-release
- Docker update, see the ["docker/"] directory
- Fix in ["types.hpp"] for defaulting types when not using CMake

Version 4.3.3 - 8 August 2023
- Minor bugfix in pyqpp setup.py that prevented pip install from remote
Expand Down
6 changes: 6 additions & 0 deletions include/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ using idx = unsigned int;
using idx = unsigned long int;
#elif defined(QPP_IDX_ULONG_LONG)
using idx = unsigned long long int;
#else // build without CMake
using idx = std::size_t;
#endif
static_assert(std::is_integral_v<idx>, "Type must be integral");
static_assert(sizeof(idx) > 1, "Type must be at least 2 bytes long");
Expand All @@ -74,6 +76,8 @@ using bigint = int;
using bigint = long int;
#elif defined(QPP_BIGINT_LONG_LONG)
using bigint = long long int;
#else // build without CMake
using bigint = long long int;
#endif
static_assert(std::is_integral_v<bigint>, "Type must be integral");
static_assert(std::is_signed_v<bigint>, "Type must be signed");
Expand All @@ -90,6 +94,8 @@ using realT = float;
using realT = double;
#elif defined(QPP_FP_LONG_DOUBLE)
using realT = long double;
#else // build without CMake
using realT = double;
#endif
static_assert(std::is_floating_point_v<realT>, "Type myst be floating-point");

Expand Down

0 comments on commit efaf7cd

Please sign in to comment.