[libcxx-commits] [PATCH] D133013: [libc++] Enable rvalue overloads for pair in C++03
Hui via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 31 10:04:57 PDT 2022
huixie90 added inline comments.
================
Comment at: libcxx/include/__utility/pair.h:424-445
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _T1, class _T2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
make_pair(_T1&& __t1, _T2&& __t2)
{
----------------
I guess this somehow changed the c++ 03 behaviour. it used to make copies on 1. function parameters 2. constructor initialisers
Now it only make the copy inside constructors. Is it ok to make this change?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133013/new/
https://reviews.llvm.org/D133013
More information about the libcxx-commits
mailing list