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

warning: implicit conversion changes signedness: 'const std::ptrdiff_t' (aka 'const long') to 'unsigned long' [-Wsign-conversion] #237

Open
yurivict opened this issue Dec 13, 2020 · 0 comments

Comments

@yurivict
Copy link

clang-10 prints this:

In file included from include/xtl/xspan.hpp:13:
include/xtl/xspan_impl.hpp:312:35: warning: implicit conversion changes signedness: 'const std::ptrdiff_t' (aka 'const long') to 'unsigned long' [-Wsign-conversion]
        TCB_SPAN_EXPECT(extent == dynamic_extent || count == extent);
                               ~~ ^~~~~~~~~~~~~~
include/xtl/xspan_impl.hpp:91:5: note: expanded from macro 'TCB_SPAN_EXPECT'
    cond ? (void) 0 : contract_violation("Expected " TCB_SPAN_STRINGIFY(cond))
    ^~~~
include/xtl/xdynamic_bitset.hpp:249:22: note: in instantiation of member function 'tcb::span<unsigned long, -1>::span' requested here
        : base_class(storage_type(ptr, detail_bitset::integer_ceil(size, base_class::s_bits_per_block)), size)
                     ^
test/test_xdynamic_bitset.cpp:244:21: note: in instantiation of member function 'xtl::xdynamic_bitset_view<unsigned long>::xdynamic_bitset_view' requested here
        bitset_view b(bs.data(), 80);
                    ^
1 warning generated.
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