Closed penberg closed 5 years ago
There's issues with const fn
and generic bounds. You should just use ::NEW
when you need a const constructor, that's what it is for.
@Amanieu Aah, thanks! I didn't see ::NEW
mentioned in the API documentation, but perhaps I didn't look closely enough.
I have an adapter defined with the
intrusive_adapter
macro as follows:However, I am unable to construct a linked list with it for a
static
variable:because the
ProcessAdapter::new()
function is not const:The following patch fixes the problem for me:
However, it cause the following compilation warning:
which I am not sure how to fix, which is why I am submitting this as an issue rather than a pull request.