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

'bits::write_int' function definition mismatches its declaration #460

Open
cartoonist opened this issue Aug 21, 2023 · 0 comments
Open

'bits::write_int' function definition mismatches its declaration #460

cartoonist opened this issue Aug 21, 2023 · 0 comments

Comments

@cartoonist
Copy link

The definition of write_int function differs from its declaration in bits struct:

static void write_int(uint64_t* word, uint64_t x, const uint8_t offset=0, const uint8_t len=64);
...
inline void bits::write_int(uint64_t* word, uint64_t x, uint8_t offset, const uint8_t len)
{
...
}

Since offset is modified inside write_int, it cannot be const. This results the following error when compiling with nvcc(11.4)/gcc(10.5):

so-76943386.cpp(29): error: expression must be a modifiable lvalue
          detected during instantiation of "void bits_impl<T>::write_int(uint64_t *, uint64_t, uint8_t, uint8_t) [with T=void]"
(63): here

1 error detected in the compilation of "so-76943386.cpp".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant