[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:
@@ -28,17 +28,17 @@
|
|||||||
template <class T = void>
|
template <class T = void>
|
||||||
struct identity : std::unary_function<T, T>
|
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 <>
|
template <>
|
||||||
struct identity<void>
|
struct identity<void>
|
||||||
{
|
{
|
||||||
template <class T>
|
template <class T>
|
||||||
constexpr auto operator()(T&& __x) const
|
constexpr auto operator()(T&& x) const
|
||||||
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
|
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
|
||||||
-> decltype (_VSTD::forward<T>(__x))
|
-> decltype (_VSTD::forward<T>(x))
|
||||||
{ return _VSTD::forward<T>(__x); }
|
{ return _VSTD::forward<T>(x); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iter1, class BOp, class UOp, class T, class Iter2>
|
template <class Iter1, class BOp, class UOp, class T, class Iter2>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
@@ -28,17 +29,17 @@
|
|||||||
template <class T = void>
|
template <class T = void>
|
||||||
struct identity : std::unary_function<T, T>
|
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 <>
|
template <>
|
||||||
struct identity<void>
|
struct identity<void>
|
||||||
{
|
{
|
||||||
template <class T>
|
template <class T>
|
||||||
constexpr auto operator()(T&& __x) const
|
constexpr auto operator()(T&& x) const
|
||||||
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
|
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
|
||||||
-> decltype (_VSTD::forward<T>(__x))
|
-> decltype (_VSTD::forward<T>(x))
|
||||||
{ return _VSTD::forward<T>(__x); }
|
{ return _VSTD::forward<T>(x); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iter1, class BOp, class UOp, class Iter2>
|
template <class Iter1, class BOp, class UOp, class Iter2>
|
||||||
|
|||||||
@@ -28,17 +28,17 @@
|
|||||||
template <class T = void>
|
template <class T = void>
|
||||||
struct identity : std::unary_function<T, T>
|
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 <>
|
template <>
|
||||||
struct identity<void>
|
struct identity<void>
|
||||||
{
|
{
|
||||||
template <class T>
|
template <class T>
|
||||||
constexpr auto operator()(T&& __x) const
|
constexpr auto operator()(T&& x) const
|
||||||
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
|
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
|
||||||
-> decltype (_VSTD::forward<T>(__x))
|
-> decltype (_VSTD::forward<T>(x))
|
||||||
{ return _VSTD::forward<T>(__x); }
|
{ return _VSTD::forward<T>(x); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iter1, class BOp, class UOp, class T, class Iter2>
|
template <class Iter1, class BOp, class UOp, class T, class Iter2>
|
||||||
|
|||||||
@@ -24,34 +24,34 @@
|
|||||||
template <class T = void>
|
template <class T = void>
|
||||||
struct identity : std::unary_function<T, T>
|
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 <>
|
template <>
|
||||||
struct identity<void>
|
struct identity<void>
|
||||||
{
|
{
|
||||||
template <class T>
|
template <class T>
|
||||||
constexpr auto operator()(T&& __x) const
|
constexpr auto operator()(T&& x) const
|
||||||
_NOEXCEPT_(noexcept(_VSTD::forward<T>(__x)))
|
_NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
|
||||||
-> decltype (_VSTD::forward<T>(__x))
|
-> decltype (_VSTD::forward<T>(x))
|
||||||
{ return _VSTD::forward<T>(__x); }
|
{ return _VSTD::forward<T>(x); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <class T = void>
|
template <class T = void>
|
||||||
struct twice
|
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 <>
|
template <>
|
||||||
struct twice<void>
|
struct twice<void>
|
||||||
{
|
{
|
||||||
template <class T>
|
template <class T>
|
||||||
constexpr auto operator()(const T& __x) const
|
constexpr auto operator()(const T& x) const
|
||||||
_NOEXCEPT_(noexcept(2 * __x))
|
_NOEXCEPT_(noexcept(2 * x))
|
||||||
-> decltype (2 * __x)
|
-> decltype (2 * x)
|
||||||
{ return 2 * __x; }
|
{ return 2 * x; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iter1, class T, class BOp, class UOp>
|
template <class Iter1, class T, class BOp, class UOp>
|
||||||
|
|||||||
Reference in New Issue
Block a user