> On 16. Jul 2017, at 16:26, Dave Abrahams via swift-evolution
> wrote:
>
>
> on Sun Jul 16 2017, Jens Persson wrote:
>
>> On Wed, Jul 12, 2017 at 12:23 AM, Dave Abrahams via swift-evolution <
>> swift-evolution@swift.org> wrote:
>>
>>>
on Sun Jul 16 2017, Jens Persson wrote:
> On Wed, Jul 12, 2017 at 12:23 AM, Dave Abrahams via swift-evolution <
> swift-evolution@swift.org> wrote:
>
>> /../
>> As ever, my first question when a new protocol is proposed is, “what
>> generic algorithms rely on this
On Wed, Jul 12, 2017 at 12:23 AM, Dave Abrahams via swift-evolution <
swift-evolution@swift.org> wrote:
> /../
> As ever, my first question when a new protocol is proposed is, “what
> generic algorithms rely on this protocol?”
>
>
First, please note that I made some mistakes in the code earlier
on Tue Jul 11 2017, Jens Persson wrote:
> I've found it practical/necessary to write my own BitPatternRepresentable
> protocol and IMHO it feels like something that could have been added along
> with the improved numeric protocols of Swift 4.
>
> Would it make sense
I've found it practical/necessary to write my own BitPatternRepresentable
protocol and IMHO it feels like something that could have been added along
with the improved numeric protocols of Swift 4.
Would it make sense to add something like the following to the standard
library?
/// A type that
Oh, I forgot the signed IntN types:
extension Int8 : BitPatternRepresentable {
var bitPattern: UInt8 { return UInt8(bitPattern: self) }
init(bitPattern: UInt8) { self = Int8(bitPattern: bitPattern) }
}
extension Int16 : BitPatternRepresentable {
var bitPattern: UInt16 { return