std::polymorphic<T, Allocator>:: operator=
From cppreference.net
<
cpp
|
memory
|
polymorphic
|
constexpr
polymorphic
&
operator
=
(
const
polymorphic
&
other
)
;
|
(1) | (C++26부터) |
|
constexpr
polymorphic
&
operator
=
(
polymorphic
&&
other
)
noexcept ( /* 아래 참조 */ ) ; |
(2) | (C++26부터) |
* this 의 내용을 other 의 내용으로 대체합니다.
traits
를
std::
allocator_traits
<
Allocator
>
로 정의합니다:
1)
만약
std::
addressof
(
other
)
==
this
가
true
이면, 아무 작업도 수행하지 않습니다. 그렇지 않으면,
need_update
를
traits
::
propagate_on_container_copy_assignment
::
value
로 설정합니다:
2)
만약
std::
addressof
(
other
)
==
this
가
true
이면, 아무 작업도 수행하지 않습니다. 그렇지 않으면,
need_update
를
traits
::
propagate_on_container_move_assignment
::
value
로 설정합니다:
다음 조건들이 모두 충족되면 프로그램은 형식에 맞지 않습니다(ill-formed):
- std:: allocator_traits < Allocator > :: is_always_equal :: value 가 false 인 경우.
-
T가 불완전한 타입(incomplete type)인 경우.
목차 |
매개변수
| other | - |
할당에 사용되는 소유된 값(존재하는 경우)을 가진 또 다른
polymorphic
객체
|
반환값
* this
예외
1)
예외가 발생하면,
*
this
에는 아무런 영향이 없습니다.
2)
예외가 발생하면,
*
this
또는
other
에 아무런 영향도 미치지 않습니다.
noexcept
명세:
noexcept
(
std::
allocator_traits
<
Allocator
>
::
propagate_on_container_move_assignment
::
value
예제
|
이 섹션은 불완전합니다
이유: 예제 없음 |