HaoYang670 commented on issue #2001:
URL: https://github.com/apache/arrow-rs/issues/2001#issuecomment-1174489633
>didn't you already say it is unstable feature?
Oh, that's `const_generic_exprs`. I don't know we can use const as generic
parameter.
Sorry for the confusion.
You are right. The`const_generic` is stable but the `const_generic_exprs`
is ubstable, which means we can't add bound to the const generic so far:
(not tested)
```rust
#![feature(const_generic_exprs)]
impl<const BYTE_LENGTH> Decimal<{BYTE_LENGTH}> // const generic is stable
where {BYTE_LENGTH == 16 || BYTE_LENGTH == 32} // const generic expr is
unstable
{...}
```
This is just an alternative way to implment Decimal, DecimalArray and
DecimalArrayBuilder.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]