Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] Spurious warning when using iota with signed integers as seed #70

Closed
hiGepi opened this issue Jun 30, 2023 · 0 comments
Closed

[BUG] Spurious warning when using iota with signed integers as seed #70

hiGepi opened this issue Jun 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@hiGepi
Copy link

hiGepi commented Jun 30, 2023

Describe the bug

/home/higepi/stage/kiwaku/test/algorithms/find.cpp:58:22: note: in instantiation of function template specialization 'kumi::iota<4UL, int>' requested here
  auto vdata = kumi::iota<4>(1);
                     ^
In file included from /home/higepi/stage/kiwaku/test/algorithms/find.cpp:9:
In file included from /home/higepi/stage/kiwaku/include/kwk/algorithm/find.hpp:10:
In file included from /home/higepi/stage/kiwaku/include/kwk/concepts/container.hpp:13:
In file included from /home/higepi/stage/kiwaku/include/kwk/settings/size.hpp:10:
In file included from /home/higepi/stage/kiwaku/include/kwk/utility/container/shape.hpp:12:
/home/higepi/stage/kiwaku/include/kwk/detail/kumi.hpp:1098:28: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
      return kumi::tuple{T(v+I)...};
                           ^~
/home/higepi/stage/kiwaku/include/kwk/detail/kumi.hpp:1098:28: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
      return kumi::tuple{T(v+I)...};
                           ^~
/home/higepi/stage/kiwaku/include/kwk/detail/kumi.hpp:1098:28: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
      return kumi::tuple{T(v+I)...};

To Reproduce
auto vdata = kumi::iota<4>(1);

Expected behavior
Iota must compile without warning

@hiGepi hiGepi added the bug Something isn't working label Jun 30, 2023
@jfalcou jfalcou closed this as completed in dc33c93 Oct 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant