proxygen
folly::replaceable_detail::move_assignment_mixin< T, true > Struct Template Reference

#include <Replaceable.h>

Public Member Functions

 move_assignment_mixin ()=default
 
 move_assignment_mixin (move_assignment_mixin &&)=default
 
 move_assignment_mixin (move_assignment_mixin const &)=default
 
move_assignment_mixinoperator= (move_assignment_mixin &&other) noexcept(std::is_nothrow_destructible< T >::value &&std::is_nothrow_move_constructible< T >::value)
 
move_assignment_mixinoperator= (move_assignment_mixin const &)=default
 

Detailed Description

template<class T>
struct folly::replaceable_detail::move_assignment_mixin< T, true >

Definition at line 277 of file Replaceable.h.

Constructor & Destructor Documentation

template<class T >
folly::replaceable_detail::move_assignment_mixin< T, true >::move_assignment_mixin ( move_assignment_mixin< T, true > const &  )
default

Member Function Documentation

template<class T >
move_assignment_mixin& folly::replaceable_detail::move_assignment_mixin< T, true >::operator= ( move_assignment_mixin< T, true > &&  other)
inlinenoexcept

Definition at line 282 of file Replaceable.h.

References folly::launder(), folly::gen::move, folly::T, and value.

284  {
285  T* destruct_ptr = launder(reinterpret_cast<T*>(
286  reinterpret_cast<Replaceable<T>*>(this)->storage_));
287  destruct_ptr->~T();
288  ::new (reinterpret_cast<Replaceable<T>*>(this)->storage_)
289  T(*std::move(reinterpret_cast<Replaceable<T>&>(other)));
290  return *this;
291  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
STL namespace.
folly::std T
FOLLY_NODISCARD T * launder(T *in) noexcept
Definition: Launder.h:48
template<class T >
move_assignment_mixin& folly::replaceable_detail::move_assignment_mixin< T, true >::operator= ( move_assignment_mixin< T, true > const &  )
default

The documentation for this struct was generated from the following file: