Skip to content

Instantly share code, notes, and snippets.

/pair.cc Secret

Created August 29, 2015 12:55
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 anonymous/0cc5c77b5517826511b6 to your computer and use it in GitHub Desktop.
Save anonymous/0cc5c77b5517826511b6 to your computer and use it in GitHub Desktop.
template <typename T1, typename T2>
struct pair {
//...
template <typename Other1, typename Other2> constexpr
pair (Other1 &&o1, Other2 &&o2 ) noexcept (
noexcept (first (forward<Other1>(o1 ))) &&
noexcept (second (forward<Other2>(o2 )))
): first (forward<Other1>(o1 )), second (forward<Other2>(o2 )) {}
//...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment