[libcxx] [test] Rename __x to x. NFCI.

This improves readability and (theoretically) improves portability,
as __ugly names are reserved.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@310760 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2017-08-11 20:54:06 +00:00
parent e75f899c12
commit 8cbff23f7d
4 changed files with 26 additions and 25 deletions

View File

@@ -28,17 +28,17 @@
template <class T = void>
struct identity : std::unary_function<T, T>
{
constexpr const T& operator()(const T& __x) const { return __x;}
constexpr const T& operator()(const T& x) const { return x;}
};
template <>
struct identity<void>
{
template <class T>
constexpr auto operator()(T&& __x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
-> decltype (_VSTD::forward<T>(__x))
{ return _VSTD::forward<T>(__x); }
constexpr auto operator()(T&& x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
-> decltype (_VSTD::forward<T>(x))
{ return _VSTD::forward<T>(x); }
};
template <class Iter1, class BOp, class UOp, class T, class Iter2>

View File

@@ -1,3 +1,4 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
@@ -28,17 +29,17 @@
template <class T = void>
struct identity : std::unary_function<T, T>
{
constexpr const T& operator()(const T& __x) const { return __x;}
constexpr const T& operator()(const T& x) const { return x;}
};
template <>
struct identity<void>
{
template <class T>
constexpr auto operator()(T&& __x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
-> decltype (_VSTD::forward<T>(__x))
{ return _VSTD::forward<T>(__x); }
constexpr auto operator()(T&& x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
-> decltype (_VSTD::forward<T>(x))
{ return _VSTD::forward<T>(x); }
};
template <class Iter1, class BOp, class UOp, class Iter2>

View File

@@ -28,17 +28,17 @@
template <class T = void>
struct identity : std::unary_function<T, T>
{
constexpr const T& operator()(const T& __x) const { return __x;}
constexpr const T& operator()(const T& x) const { return x;}
};
template <>
struct identity<void>
{
template <class T>
constexpr auto operator()(T&& __x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
-> decltype (_VSTD::forward<T>(__x))
{ return _VSTD::forward<T>(__x); }
constexpr auto operator()(T&& x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
-> decltype (_VSTD::forward<T>(x))
{ return _VSTD::forward<T>(x); }
};
template <class Iter1, class BOp, class UOp, class T, class Iter2>

View File

@@ -24,34 +24,34 @@
template <class T = void>
struct identity : std::unary_function<T, T>
{
constexpr const T& operator()(const T& __x) const { return __x;}
constexpr const T& operator()(const T& x) const { return x;}
};
template <>
struct identity<void>
{
template <class T>
constexpr auto operator()(T&& __x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
-> decltype (_VSTD::forward<T>(__x))
{ return _VSTD::forward<T>(__x); }
constexpr auto operator()(T&& x) const
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
-> decltype (_VSTD::forward<T>(x))
{ return _VSTD::forward<T>(x); }
};
template <class T = void>
struct twice
{
constexpr const T operator()(const T& __x) const noexcept { return 2 * __x; }
constexpr const T operator()(const T& x) const noexcept { return 2 * x; }
};
template <>
struct twice<void>
{
template <class T>
constexpr auto operator()(const T& __x) const
_NOEXCEPT_(noexcept(2 * __x))
-> decltype (2 * __x)
{ return 2 * __x; }
constexpr auto operator()(const T& x) const
_NOEXCEPT_(noexcept(2 * x))
-> decltype (2 * x)
{ return 2 * x; }
};
template <class Iter1, class T, class BOp, class UOp>