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

Trouble with swappability of non-swappable and/or non-movable types, in C++17 #87

Open
eyalroz opened this issue Nov 23, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@eyalroz
Copy link
Owner

eyalroz commented Nov 23, 2020

When compiling with C++17, static assertions regarding swappability with non-swappable and with non-immutable types are applied; and they fail, or rather - one fails and the other doesn't, and it depends on how exactly I tweak the swap-related code in array.hpp and elsewhere.

I haven't figured out exactly what I'm supposed to do with this.... :-(

@eyalroz eyalroz added the bug Something isn't working label Nov 23, 2020
@eyalroz eyalroz self-assigned this Nov 23, 2020
@eyalroz
Copy link
Owner Author

eyalroz commented Nov 23, 2020

See also #84 .

eyalroz pushed a commit that referenced this issue Nov 23, 2020
…ed using C++17):

* Corrected `using` syntax for `conjunction`, `disjunction`, `bool_constant` and `negation`
* Now using `kat::swap` in the swapping loop of `kat::array::swap`
* Now using iterators in the swapping loop of `kat::array::swap`
* Not trying to issue a trap instruction with C++17 in constexpr methods; with C++20 - issuing the instruction when guaranteed evaluation at run-time (and on the device)
* Added: Missing template argument deducation guide for `kat::array`
* Made sure `std::forward` and `std::move` are made accessible with `using` where necessary
* Dropped a copy of an internal libstdc++ definition we were making by mistake
* Avoiding warnings in `span.hpp` about a useless comparison of a 0-valued template argument (which only show up with C++17 enabled)
* Removed inappropriately-placed `KAT_HD` markers within `if constexpr` statements
* Properly marking `std::byte` with its namespace (rather than using just `byte`)
* Properly marking `std::initializer_list` with its namespace (rather than using just `initializer_list`)
* Added: A note about a missing implementation of kat::apply (see issue #86)
* Avoiding a warning about a narrowing cast `int` -> `std::size_t` which the compiler should not be issuing (for i between 0 and 4)
* Moved a type definition out of a doctest sub-testcase - another issue similar to what we had with `tuple_get` (this may already be a problem with C++14)
* Some commented-out code and `#if FALSE`'es related to issue #87 (C++17 + swap troubles)
* Some code formatting tweaks
eyalroz pushed a commit that referenced this issue May 28, 2021
…ng C++17 by default):

* Corrected `using` syntax for `conjunction`, `disjunction`, `bool_constant` and `negation`
* Now using `kat::swap` in the swapping loop of `kat::array::swap`
* Now using iterators in the swapping loop of `kat::array::swap`
* Not trying to issue a trap instruction with C++17 in constexpr methods; with C++20 - issuing the instruction when guaranteed evaluation at run-time (and on the device)
* Added: Missing template argument deducation guide for `kat::array`
* Made sure `std::forward` and `std::move` are made accessible with `using` where necessary
* Dropped a copy of an internal libstdc++ definition we were making by mistake
* Avoiding warnings in `span.hpp` about a useless comparison of a 0-valued template argument (which only show up with C++17 enabled)
* Removed inappropriately-placed `KAT_HD` markers within `if constexpr` statements
* Properly marking `std::byte` with its namespace (rather than using just `byte`)
* Properly marking `std::initializer_list` with its namespace (rather than using just `initializer_list`)
* Added: A note about a missing implementation of kat::apply (see issue #86)
* Avoiding a warning about a narrowing cast `int` -> `std::size_t` which the compiler should not be issuing (for i between 0 and 4)
* Moved a type definition out of a doctest sub-testcase - another issue similar to what we had with `tuple_get` (this may already be a problem with C++14)
* Some commented-out code and `#if FALSE`'es related to issue #87 (C++17 + swap troubles)
* Some code formatting tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant