You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 12, 2023. It is now read-only.
A lot of the functions in the sets are not const because they use closures to destructure internal representations. It should be possible to achieve the destructuring with the use of const fns though, with no closure, perhaps associated const fns of the internal representation types.
I don't believe it is possible for the builders to work in const contexts yet, unless mutable references are allowed in const fns (link to tracking issue). I feel like in theory they should be able to work - all of the mutations can occur during const evaluation only, and all of the mutable references go out of scope if the build() function is called. The thing that wouldn't work is a const mutable reference at the end of const evaluation (i.e. build() is not called), which feels like it could be something that an error is generated for only if a mutable reference is left over at the end of const evaluation. That's just my intuitive point of view, though, not sure how it works in practice.
A lot of the functions in the sets are not
constbecause they use closures to destructure internal representations. It should be possible to achieve the destructuring with the use ofconst fns though, with no closure, perhaps associatedconst fns of the internal representation types.I don't believe it is possible for the builders to work in
constcontexts yet, unless mutable references are allowed inconstfns (link to tracking issue). I feel like in theory they should be able to work - all of the mutations can occur duringconstevaluation only, and all of the mutable references go out of scope if thebuild()function is called. The thing that wouldn't work is aconstmutable reference at the end ofconstevaluation (i.e.build()is not called), which feels like it could be something that an error is generated for only if a mutable reference is left over at the end ofconstevaluation. That's just my intuitive point of view, though, not sure how it works in practice.