Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix in types.hpp #162

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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