mirror of https://github.com/ARMmbed/mbed-os.git
commit
73d6aa59af
|
@ -16,7 +16,7 @@ Omissions are:
|
||||||
User code should normally be able to include C++14 headers and get
|
User code should normally be able to include C++14 headers and get
|
||||||
most expected functionality. (But bear in mind that many C++ library
|
most expected functionality. (But bear in mind that many C++ library
|
||||||
features like streams and STL containers are quite heavy and may
|
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
|
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,
|
no C++11/14 library. For the headers that are totally new in C++11,
|
||||||
|
|
|
@ -89,23 +89,14 @@ namespace std {
|
||||||
// [refwrap]
|
// [refwrap]
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class reference_wrapper {
|
class reference_wrapper {
|
||||||
T &FUN(T &x) noexcept { return x; }
|
|
||||||
void FUN(T &&x) = delete;
|
|
||||||
T *ptr;
|
T *ptr;
|
||||||
public:
|
public:
|
||||||
using type = T;
|
using type = T;
|
||||||
// [refwrap.const]
|
// [refwrap.const]
|
||||||
#if 0
|
// LWG 2993 version of constructor does not seem to work in ARM C 5, so stick with
|
||||||
// decltype doesn't seem to work well enough for this revised version
|
// this original version.
|
||||||
template <typename U,
|
|
||||||
typename = enable_if_t<!is_same<reference_wrapper, decay_t<U>>::value &&
|
|
||||||
!is_void<decltype(FUN(declval<U>()))>::value>>
|
|
||||||
reference_wrapper(U&& x) //noexcept(noexcept(FUN(declval<U>())))
|
|
||||||
: ptr(addressof(FUN(forward<U>(x)))) { }
|
|
||||||
#else
|
|
||||||
reference_wrapper(T &x) noexcept : ptr(addressof(x)) { }
|
reference_wrapper(T &x) noexcept : ptr(addressof(x)) { }
|
||||||
reference_wrapper(T &&x) = delete;
|
reference_wrapper(T &&x) = delete;
|
||||||
#endif
|
|
||||||
|
|
||||||
reference_wrapper(const reference_wrapper &) noexcept = default;
|
reference_wrapper(const reference_wrapper &) noexcept = default;
|
||||||
// [refwrap.assign]
|
// [refwrap.assign]
|
||||||
|
@ -483,7 +474,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
impl::not_fn_t<F> not_fn_t(F&& f)
|
impl::not_fn_t<F> not_fn(F&& f)
|
||||||
{
|
{
|
||||||
return impl::not_fn_t<F>(std::forward<F>(f));
|
return impl::not_fn_t<F>(std::forward<F>(f));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue