0001 // 0002 // ShiftOperationsType.swift 0003 // BigInt 0004 // 0005 // Created by Károly Lőrentey on 2016-01-03. 0006 // Copyright © 2016 Károly Lőrentey. All rights reserved. 0007 // 0008 0009 import Foundation 0010 0011 // This protocol is missing from stdlib for some reason. 0012 0013 /// Describes a type that supports all the standard shift operators. 0014 public protocol ShiftOperationsType{ 0015 /// Shift the value `a` by `b` bits to the left and return the result. 0016 @warn_unused_result 0017 func <<(a: Self, b: Self) -> Self 0018 0019 /// Shift the value `a` by `b` bits to the right and return the result. 0020 @warn_unused_result 0021 func >>(a: Self, b: Self) -> Self 0022 0023 /// Shift the value `a` by `b` bits to the left and store the result in `a`. 0024 func <<=(inout a: Self, b: Self) 0025 0026 /// Shift the value `a` by `b` bits to the right and store the result in `a`. 0027 func >>=(inout a: Self, b: Self) 0028 } 0029 0030
BigDigit.swift:11 internal protocol BigDigit: UnsignedIntegerType, BitwiseOperationsType, ShiftOperationsType {