diff --git a/platform/cxxsupport/README.md b/platform/cxxsupport/README.md index d35a71248a..6f811cbac5 100644 --- a/platform/cxxsupport/README.md +++ b/platform/cxxsupport/README.md @@ -16,7 +16,7 @@ Omissions are: User code should normally be able to include C++14 headers and get most expected functionality. (But bear in mind that many C++ library features like streams and STL containers are quite heavy and may -not be appropriate for small embnedded use). +not be appropriate for small embedded use). However, ARM C 5 has only C++11 language support (at least a large subset), and no C++11/14 library. For the headers that are totally new in C++11, diff --git a/platform/cxxsupport/mstd_functional b/platform/cxxsupport/mstd_functional index 991f1b4161..afe84a5ea8 100644 --- a/platform/cxxsupport/mstd_functional +++ b/platform/cxxsupport/mstd_functional @@ -89,23 +89,14 @@ namespace std { // [refwrap] template class reference_wrapper { - T &FUN(T &x) noexcept { return x; } - void FUN(T &&x) = delete; T *ptr; public: using type = T; // [refwrap.const] -#if 0 - // decltype doesn't seem to work well enough for this revised version - template >::value && - !is_void()))>::value>> - reference_wrapper(U&& x) //noexcept(noexcept(FUN(declval()))) - : ptr(addressof(FUN(forward(x)))) { } -#else + // LWG 2993 version of constructor does not seem to work in ARM C 5, so stick with + // this original version. reference_wrapper(T &x) noexcept : ptr(addressof(x)) { } reference_wrapper(T &&x) = delete; -#endif reference_wrapper(const reference_wrapper &) noexcept = default; // [refwrap.assign] @@ -483,7 +474,7 @@ public: } template -impl::not_fn_t not_fn_t(F&& f) +impl::not_fn_t not_fn(F&& f) { return impl::not_fn_t(std::forward(f)); }