Skip to content

Commit 73d6aa5

Browse files
authored
Merge pull request #11211 from kjbracey-arm/mstd
Review follow-up mstd fixes
2 parents b849bc1 + ff0ce04 commit 73d6aa5

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

platform/cxxsupport/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Omissions are:
1616
User code should normally be able to include C++14 headers and get
1717
most expected functionality. (But bear in mind that many C++ library
1818
features like streams and STL containers are quite heavy and may
19-
not be appropriate for small embnedded use).
19+
not be appropriate for small embedded use).
2020

2121
However, ARM C 5 has only C++11 language support (at least a large subset), and
2222
no C++11/14 library. For the headers that are totally new in C++11,

platform/cxxsupport/mstd_functional

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,14 @@ namespace std {
8989
// [refwrap]
9090
template <typename T>
9191
class reference_wrapper {
92-
T &FUN(T &x) noexcept { return x; }
93-
void FUN(T &&x) = delete;
9492
T *ptr;
9593
public:
9694
using type = T;
9795
// [refwrap.const]
98-
#if 0
99-
// decltype doesn't seem to work well enough for this revised version
100-
template <typename U,
101-
typename = enable_if_t<!is_same<reference_wrapper, decay_t<U>>::value &&
102-
!is_void<decltype(FUN(declval<U>()))>::value>>
103-
reference_wrapper(U&& x) //noexcept(noexcept(FUN(declval<U>())))
104-
: ptr(addressof(FUN(forward<U>(x)))) { }
105-
#else
96+
// LWG 2993 version of constructor does not seem to work in ARM C 5, so stick with
97+
// this original version.
10698
reference_wrapper(T &x) noexcept : ptr(addressof(x)) { }
10799
reference_wrapper(T &&x) = delete;
108-
#endif
109100

110101
reference_wrapper(const reference_wrapper &) noexcept = default;
111102
// [refwrap.assign]
@@ -483,7 +474,7 @@ public:
483474
}
484475

485476
template <typename F>
486-
impl::not_fn_t<F> not_fn_t(F&& f)
477+
impl::not_fn_t<F> not_fn(F&& f)
487478
{
488479
return impl::not_fn_t<F>(std::forward<F>(f));
489480
}

0 commit comments

Comments
 (0)