oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • C++ Reference
  • About
    • Help
    • Terms of Use
    • Technical Specifications
    • Credits

C++ Reference as of 28 May 2018

C++ concepts: MoveAssignable (since C++11) - cppreference.com

C++ concepts: MoveAssignable (since C++11)

From cppreference.com
< cpp‎ | concept
 
C++
Language
Headers
Library concepts
Language support library
Diagnostics library
Utilities library
Strings library
Containers library
Algorithms library
Iterators library
Numerics library
Input/output library
Localizations library
Regular expressions library (C++11)
Atomic operations library (C++11)
Thread support library (C++11)
Filesystem library (C++17)
Technical Specifications
 
C++ concepts
Basic
DefaultConstructible
CopyAssignable
CopyConstructible
MoveAssignable
(C++11)
MoveConstructible
(C++11)
Destructible
Layout
TrivialType
(C++11)
TriviallyCopyable
(C++11)
StandardLayoutType
(C++11)
PODType
Library-Wide
EqualityComparable
LessThanComparable
Swappable
(C++11)
ValueSwappable
(C++11)
NullablePointer
(C++11)
Hash
(C++11)
Allocator
FunctionObject
Callable
Predicate
BinaryPredicate
Compare
Container
Container
SequenceContainer
ContiguousContainer
(C++17)
ReversibleContainer
AssociativeContainer
AllocatorAwareContainer
UnorderedAssociativeContainer
(C++11)
Container Elements
DefaultInsertable
(C++11)
CopyInsertable
(C++11)
MoveInsertable
(C++11)
EmplaceConstructible
(C++11)
Erasable
(C++11)
Iterator
Iterator
OutputIterator
InputIterator
ForwardIterator
BidirectionalIterator
RandomAccessIterator
ContiguousIterator
(C++17)
Stream I/O
FormattedInputFunction
UnformattedInputFunction
FormattedOutputFunction
UnformattedOutputFunction
Random Numbers
SeedSequence
(C++11)
RandomNumberEngine
(C++11)
RandomNumberDistribution
(C++11)
UniformRandomBitGenerator
(C++11)
RandomNumberEngineAdaptor
(C++11)
Concurrency
BasicLockable
(C++11)
Lockable
(C++11)
TimedLockable
(C++11)
Mutex
(C++11)
TimedMutex
(C++11)
SharedMutex
(C++17)
SharedTimedMutex
(C++14)
Other
CharTraits
RegexTraits
(C++11)
BitmaskType
NumericType
LiteralType
(C++11)
UnaryTypeTrait
(C++11)
BinaryTypeTrait
(C++11)
TransformationTrait
(C++11)
Clock
(C++11)
TrivialClock
(C++11)
 

Specifies that an instance of the type can be assigned from an rvalue argument.

Requirements

The type T satisfies MoveAssignable if

Given

  • t, a modifiable lvalue expression of type T
  • rv, an rvalue expression of type T

The following expressions must be valid and have their specified effects

Expression Return type Return value Post-conditions
t = rv T& t If t and rv do not refer to the same object , the value of t is equivalent to the value of rv before the assignment.

The new value of rv is unspecified

Notes

The type does not have to implement move assignment operator in order to satisfy this type requirement: a copy assignment operator that takes its parameter by value or as a const Type&, will bind to rvalue argument.

If a MoveAssignable class implements a move assignment operator, it may also implement move semantics to take advantage of the fact that the value of rv after assignment is unspecified.

See also

is_move_assignableis_trivially_move_assignableis_nothrow_move_assignable
(C++11)(C++11)(C++11)
checks if a type has a move assignment operator
(class template)
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/concept/MoveAssignable&oldid=91894"
Hidden category:
  • Pages with unreviewed LWG DR marker
Navigation
  • Online version
  • Offline version retrieved 2018-04-14 22:05.
  • This page was last modified on 31 March 2017, at 13:01.
  • This page has been accessed 45,489 times.
mrJudge 31.05.2018 (F43DD)
Copyright © 2018 mrJudge. All rights reserved.

Under Construction

Stats Tab Content

Under Construction too