Skip to content

Instantly share code, notes, and snippets.

@danlark1
Created April 13, 2020 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danlark1/c1b144401cea90549e195996aaf0908e to your computer and use it in GitHub Desktop.
Save danlark1/c1b144401cea90549e195996aaf0908e to your computer and use it in GitHub Desktop.
struct __nat {};
pair& operator=(typename conditional<
is_copy_assignable<first_type>::value &&
is_copy_assignable<second_type>::value,
pair, __nat>::type const& __p)
noexcept(is_nothrow_copy_assignable<first_type>::value &&
s_nothrow_copy_assignable<second_type>::value)
{
first = __p.first;
second = __p.second;
return *this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment