Skip to content

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

Description

@cartoonist

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".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions