---
title: Copyable
framework: swift
role: symbol
role_heading: Protocol
path: swift/copyable
---

# Copyable

A type whose values can be implicitly or explicitly copied.

## Declaration

```swift
protocol Copyable
```

## Overview

Overview Conforming to this protocol indicates that a type’s value can be copied; this protocol doesn’t have any required methods or properties. You don’t generally need to write an explicit conformance to Copyable. The following places implicitly include Copyable conformance: Structure declarations, unless it has a noncopyable stored property Enumeration declarations, unless it has a case whose associated value isn’t copyable Class declarations Actor declarations Protocol declarations Associated type declarations The Self type in a protocol extension In an extension, the generic parameters of the type being extended A class or actor can contain noncopyable stored properties, while still being copyable itself — classes and actors are copied by retaining and releasing references. In a declaration that includes generic type parameters, each generic type parameter implicitly includes Copyable in its list of requirements. Metatypes and tuples of copyable types are also implicitly copyable, as are boxed protocol types. For example, all of the following pairs of declarations are equivalent: struct MyStructure { } struct MyStructere: Copyable { }

protocol MyProtocol { } protocol MyProtocol: Copyable { }

protocol AnotherProtocol {     associatedtype MyType     associatedtype MyType: Copyable }

func genericFunction<T>(t: T) { } func genericFunction<T>(t: T) where T: Copyable { }

let x: any MyProtocol let x: any MyProtocol & Copyable To suppress an implicit conformance to Copyable you write ~Copyable. For example, only copyable types can conform to MyProtocol in the example above, but both copyable and noncopyable types can conform NoRequirements in the example below: protocol NoRequirements: ~Copyable { } Extensions to the Copyable protocol are not allowed.

## Relationships

### Conforming Types

- [Anchor](regexbuilder/anchor.md)
- [AnyBidirectionalCollection](swift/anybidirectionalcollection.md)
- [AnyCollection](swift/anycollection.md)
- [AnyHashable](swift/anyhashable.md)
- [AnyIterator](swift/anyiterator.md)
- [AnyKeyPath](swift/anykeypath.md)
- [AnyRandomAccessCollection](swift/anyrandomaccesscollection.md)
- [AnyRegexOutput](swift/anyregexoutput.md)
- [AnySequence](swift/anysequence.md)
- [Array](swift/array.md)
- [ArraySlice](swift/arrayslice.md)
- [AsyncCompactMapSequence](swift/asynccompactmapsequence.md)
- [AsyncDropFirstSequence](swift/asyncdropfirstsequence.md)
- [AsyncDropWhileSequence](swift/asyncdropwhilesequence.md)
- [AsyncFilterSequence](swift/asyncfiltersequence.md)
- [AsyncFlatMapSequence](swift/asyncflatmapsequence.md)
- [AsyncMapSequence](swift/asyncmapsequence.md)
- [AsyncPrefixSequence](swift/asyncprefixsequence.md)
- [AsyncPrefixWhileSequence](swift/asyncprefixwhilesequence.md)
- [AsyncStream](swift/asyncstream.md)
- [AsyncThrowingCompactMapSequence](swift/asyncthrowingcompactmapsequence.md)
- [AsyncThrowingDropWhileSequence](swift/asyncthrowingdropwhilesequence.md)
- [AsyncThrowingFilterSequence](swift/asyncthrowingfiltersequence.md)
- [AsyncThrowingFlatMapSequence](swift/asyncthrowingflatmapsequence.md)
- [AsyncThrowingMapSequence](swift/asyncthrowingmapsequence.md)
- [AsyncThrowingPrefixWhileSequence](swift/asyncthrowingprefixwhilesequence.md)
- [AsyncThrowingStream](swift/asyncthrowingstream.md)
- [AtomicLoadOrdering](synchronization/atomicloadordering.md)
- [AtomicStoreOrdering](synchronization/atomicstoreordering.md)
- [AtomicUpdateOrdering](synchronization/atomicupdateordering.md)
- [AutoreleasingUnsafeMutablePointer](swift/autoreleasingunsafemutablepointer.md)
- [Bool](swift/bool.md)
- [CVaListPointer](swift/cvalistpointer.md)
- [Capture](regexbuilder/capture.md)
- [Character](swift/character.md)
- [CharacterClass](regexbuilder/characterclass.md)
- [ChoiceOf](regexbuilder/choiceof.md)
- [ClosedRange](swift/closedrange.md)
- [CollectionDifference](swift/collectiondifference.md)
- [CollectionDifference.Change](swift/collectiondifference/change.md)
- [CollectionDifference.Index](swift/collectiondifference/index.md)
- [CollectionOfOne](swift/collectionofone.md)
- [CollectionOfOne.Iterator](swift/collectionofone/iterator.md)
- [ContiguousArray](swift/contiguousarray.md)
- [ContinuousClock](swift/continuousclock.md)
- [ContinuousClock.Instant](swift/continuousclock/instant.md)
- [DecodingError](swift/decodingerror.md)
- [DefaultIndices](swift/defaultindices.md)
- [DefaultStringInterpolation](swift/defaultstringinterpolation.md)
- [Dictionary](swift/dictionary.md)
- [Dictionary.Iterator](swift/dictionary/iterator.md)
- [Dictionary.Keys](swift/dictionary/keys-swift.struct.md)
- [Dictionary.Values](swift/dictionary/values-swift.struct.md)
- [DiscardingTaskGroup](swift/discardingtaskgroup.md)
- [DiscontiguousSlice](swift/discontiguousslice.md)
- [DiscontiguousSlice.Index](swift/discontiguousslice/index.md)
- [Double](swift/double.md)
- [DropFirstSequence](swift/dropfirstsequence.md)
- [DropWhileSequence](swift/dropwhilesequence.md)
- [DropWhileSequence.Iterator](swift/dropwhilesequence/iterator.md)
- [Duration](swift/duration.md)
- [Duration.TimeFormatStyle](swift/duration/timeformatstyle.md)
- [Duration.TimeFormatStyle.Attributed](swift/duration/timeformatstyle/attributed-swift.struct.md)
- [Duration.UnitsFormatStyle](swift/duration/unitsformatstyle.md)
- [Duration.UnitsFormatStyle.Attributed](swift/duration/unitsformatstyle/attributed-swift.struct.md)
- [EmptyCollection](swift/emptycollection.md)
- [EmptyCollection.Iterator](swift/emptycollection/iterator.md)
- [EncodingError](swift/encodingerror.md)
- [EnumeratedSequence](swift/enumeratedsequence.md)
- [EnumeratedSequence.Iterator](swift/enumeratedsequence/iterator.md)
- [FlattenSequence](swift/flattensequence.md)
- [FlattenSequence.Iterator](swift/flattensequence/iterator.md)
- [Float](swift/float.md)
- [Float16](swift/float16.md)
- [Float80](swift/float80.md)
- [FloatingPointClassification](swift/floatingpointclassification.md)
- [FloatingPointSign](swift/floatingpointsign.md)
- [Hasher](swift/hasher.md)
- [IndexingIterator](swift/indexingiterator.md)
- [InlineArray](swift/inlinearray.md)
- [Int](swift/int.md)
- [Int.Words](swift/int/words-swift.struct.md)
- [Int128](swift/int128.md)
- [Int16](swift/int16.md)
- [Int16.Words](swift/int16/words-swift.struct.md)
- [Int32](swift/int32.md)
- [Int32.Words](swift/int32/words-swift.struct.md)
- [Int64](swift/int64.md)
- [Int64.Words](swift/int64/words-swift.struct.md)
- [Int8](swift/int8.md)
- [Int8.Words](swift/int8/words-swift.struct.md)
- [IteratorSequence](swift/iteratorsequence.md)
- [JobPriority](swift/jobpriority.md)
- [JoinedSequence](swift/joinedsequence.md)
- [JoinedSequence.Iterator](swift/joinedsequence/iterator.md)
- [KeyValuePairs](swift/keyvaluepairs.md)
- [LazyDropWhileSequence](swift/lazydropwhilesequence.md)
- [LazyDropWhileSequence.Iterator](swift/lazydropwhilesequence/iterator.md)
- [LazyFilterSequence](swift/lazyfiltersequence.md)
- [LazyFilterSequence.Iterator](swift/lazyfiltersequence/iterator.md)
- [LazyMapSequence](swift/lazymapsequence.md)
- [LazyMapSequence.Iterator](swift/lazymapsequence/iterator.md)
- [LazyPrefixWhileSequence](swift/lazyprefixwhilesequence.md)
- [LazyPrefixWhileSequence.Iterator](swift/lazyprefixwhilesequence/iterator.md)
- [LazySequence](swift/lazysequence.md)
- [Local](regexbuilder/local.md)
- [Lookahead](regexbuilder/lookahead.md)
- [Mirror](swift/mirror.md)
- [NegativeLookahead](regexbuilder/negativelookahead.md)
- [Never](swift/never.md)
- [ObjectIdentifier](swift/objectidentifier.md)
- [ObservationRegistrar](observation/observationregistrar.md)
- [ObservationTracking.Options](observation/observationtracking/options.md)
- [OneOrMore](regexbuilder/oneormore.md)
- [OpaquePointer](swift/opaquepointer.md)
- [Optional](swift/optional.md)
- [Optionally](regexbuilder/optionally.md)
- [PartialRangeFrom](swift/partialrangefrom.md)
- [PartialRangeThrough](swift/partialrangethrough.md)
- [PartialRangeUpTo](swift/partialrangeupto.md)
- [PrefixSequence](swift/prefixsequence.md)
- [PrefixSequence.Iterator](swift/prefixsequence/iterator.md)
- [Range](swift/range.md)
- [RangeSet](swift/rangeset.md)
- [RangeSet.Ranges](swift/rangeset/ranges-swift.struct.md)
- [Repeat](regexbuilder/repeat.md)
- [Repeated](swift/repeated.md)
- [Result](swift/result.md)
- [ReversedCollection](swift/reversedcollection.md)
- [ReversedCollection.Iterator](swift/reversedcollection/iterator.md)
- [SIMD16](swift/simd16.md)
- [SIMD2](swift/simd2.md)
- [SIMD3](swift/simd3.md)
- [SIMD32](swift/simd32.md)
- [SIMD4](swift/simd4.md)
- [SIMD64](swift/simd64.md)
- [SIMD8](swift/simd8.md)
- [Set](swift/set.md)
- [Set.Iterator](swift/set/iterator.md)
- [Slice](swift/slice.md)
- [StaticBigInt](swift/staticbigint.md)
- [StaticString](swift/staticstring.md)
- [StrideThrough](swift/stridethrough.md)
- [StrideThroughIterator](swift/stridethroughiterator.md)
- [StrideTo](swift/strideto.md)
- [StrideToIterator](swift/stridetoiterator.md)
- [String](swift/string.md)
- [String.Encoding](swift/string/encoding.md)
- [String.Index](swift/string/index.md)
- [String.LocalizationValue](swift/string/localizationvalue.md)
- [String.UTF16View](swift/string/utf16view.md)
- [String.UTF8View](swift/string/utf8view.md)
- [String.UnicodeScalarView](swift/string/unicodescalarview.md)
- [Substring](swift/substring.md)
- [Substring.UTF16View](swift/substring/utf16view.md)
- [Substring.UTF8View](swift/substring/utf8view.md)
- [Substring.UnicodeScalarView](swift/substring/unicodescalarview.md)
- [SuspendingClock](swift/suspendingclock.md)
- [SuspendingClock.Instant](swift/suspendingclock/instant.md)
- [SystemRandomNumberGenerator](swift/systemrandomnumbergenerator.md)
- [TaskGroup](swift/taskgroup.md)
- [TaskPriority](swift/taskpriority.md)
- [ThrowingDiscardingTaskGroup](swift/throwingdiscardingtaskgroup.md)
- [ThrowingTaskGroup](swift/throwingtaskgroup.md)
- [TryCapture](regexbuilder/trycapture.md)
- [UInt](swift/uint.md)
- [UInt.Words](swift/uint/words-swift.struct.md)
- [UInt128](swift/uint128.md)
- [UInt128.Words](swift/uint128/words-swift.struct.md)
- [UInt16](swift/uint16.md)
- [UInt16.Words](swift/uint16/words-swift.struct.md)
- [UInt32](swift/uint32.md)
- [UInt32.Words](swift/uint32/words-swift.struct.md)
- [UInt64](swift/uint64.md)
- [UInt64.Words](swift/uint64/words-swift.struct.md)
- [UInt8](swift/uint8.md)
- [UInt8.Words](swift/uint8/words-swift.struct.md)
- [UTF8Span.UnicodeScalarIterator](swift/utf8span/unicodescalariterator.md)
- [UnboundedRange_](swift/unboundedrange_.md)
- [Unicode.ASCII](swift/unicode/ascii.md)
- [Unicode.ASCII.Parser](swift/unicode/ascii/parser.md)
- [Unicode.Scalar](swift/unicode/scalar.md)
- [Unicode.Scalar.UTF16View](swift/unicode/scalar/utf16view.md)
- [Unicode.Scalar.UTF8View](swift/unicode/scalar/utf8view.md)
- [Unicode.UTF16](swift/unicode/utf16.md)
- [Unicode.UTF16.ForwardParser](swift/unicode/utf16/forwardparser.md)
- [Unicode.UTF16.ReverseParser](swift/unicode/utf16/reverseparser.md)
- [Unicode.UTF32](swift/unicode/utf32.md)
- [Unicode.UTF32.Parser](swift/unicode/utf32/parser.md)
- [Unicode.UTF8](swift/unicode/utf8.md)
- [Unicode.UTF8.ForwardParser](swift/unicode/utf8/forwardparser.md)
- [Unicode.UTF8.ReverseParser](swift/unicode/utf8/reverseparser.md)
- [Unicode.UTF8.ValidationError](swift/unicode/utf8/validationerror.md)
- [Unicode.UTF8.ValidationError.Kind](swift/unicode/utf8/validationerror/kind-swift.struct.md)
- [UnicodeDecodingResult](swift/unicodedecodingresult.md)
- [Unmanaged](swift/unmanaged.md)
- [UnownedJob](swift/unownedjob.md)
- [UnownedSerialExecutor](swift/unownedserialexecutor.md)
- [UnownedTaskExecutor](swift/unownedtaskexecutor.md)
- [UnsafeBufferPointer](swift/unsafebufferpointer.md)
- [UnsafeBufferPointer.Iterator](swift/unsafebufferpointer/iterator.md)
- [UnsafeContinuation](swift/unsafecontinuation.md)
- [UnsafeMutableBufferPointer](swift/unsafemutablebufferpointer.md)
- [UnsafeMutablePointer](swift/unsafemutablepointer.md)
- [UnsafeMutableRawBufferPointer](swift/unsafemutablerawbufferpointer.md)
- [UnsafeMutableRawPointer](swift/unsafemutablerawpointer.md)
- [UnsafePointer](swift/unsafepointer.md)
- [UnsafeRawBufferPointer](swift/unsaferawbufferpointer.md)
- [UnsafeRawBufferPointer.Iterator](swift/unsaferawbufferpointer/iterator.md)
- [UnsafeRawPointer](swift/unsaferawpointer.md)
- [WordPair](synchronization/wordpair.md)
- [ZeroOrMore](regexbuilder/zeroormore.md)
- [Zip2Sequence](swift/zip2sequence.md)
- [Zip2Sequence.Iterator](swift/zip2sequence/iterator.md)

## See Also

### Copying

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Escapable](swift/escapable.md)
