Lines 24-30
Link Here
|
24 |
#include <algorithm> |
24 |
#include <algorithm> |
25 |
#endif |
25 |
#endif |
26 |
|
26 |
|
27 |
#ifdef MOZ_SKIA |
27 |
#if MOZ_SKIA_AVOID_CXX11 |
28 |
#include "mozilla/Move.h" |
28 |
#include "mozilla/Move.h" |
29 |
#include "mozilla/TypeTraits.h" |
29 |
#include "mozilla/TypeTraits.h" |
30 |
|
30 |
|
Lines 32-54
Link Here
|
32 |
#include "mozilla/Function.h" |
32 |
#include "mozilla/Function.h" |
33 |
#endif |
33 |
#endif |
34 |
|
34 |
|
35 |
// In libc++, symbols such as std::forward may be defined in std::__1. |
35 |
namespace std { |
36 |
// The _LIBCPP_BEGIN_NAMESPACE_STD and _LIBCPP_END_NAMESPACE_STD macros |
|
|
37 |
// will expand to the correct namespace. |
38 |
#ifdef _LIBCPP_BEGIN_NAMESPACE_STD |
39 |
#define MOZ_BEGIN_STD_NAMESPACE _LIBCPP_BEGIN_NAMESPACE_STD |
40 |
#define MOZ_END_STD_NAMESPACE _LIBCPP_END_NAMESPACE_STD |
41 |
#else |
42 |
#define MOZ_BEGIN_STD_NAMESPACE namespace std { |
43 |
#define MOZ_END_STD_NAMESPACE } |
44 |
#endif |
45 |
|
46 |
MOZ_BEGIN_STD_NAMESPACE |
47 |
using mozilla::Forward; |
36 |
using mozilla::Forward; |
48 |
#define forward Forward |
37 |
#define forward Forward |
49 |
MOZ_END_STD_NAMESPACE |
|
|
50 |
|
51 |
namespace std { |
52 |
#if SKIA_IMPLEMENTATION |
38 |
#if SKIA_IMPLEMENTATION |
53 |
using mozilla::IntegralConstant; |
39 |
using mozilla::IntegralConstant; |
54 |
using mozilla::IsEmpty; |
40 |
using mozilla::IsEmpty; |
Lines 73-79
template <bool B, typename T = void> usi
Link Here
|
73 |
|
59 |
|
74 |
} |
60 |
} |
75 |
|
61 |
|
76 |
#else /* !MOZ_SKIA */ |
62 |
#else /* !MOZ_SKIA_AVOID_CXX11 */ |
77 |
|
63 |
|
78 |
#include <type_traits> |
64 |
#include <type_traits> |
79 |
#include <functional> |
65 |
#include <functional> |
Lines 178-184
template <typename D, typename S> using
Link Here
|
178 |
|
164 |
|
179 |
} // namespace sknonstd |
165 |
} // namespace sknonstd |
180 |
|
166 |
|
181 |
#endif /* MOZ_SKIA */ |
167 |
#endif /* MOZ_SKIA_AVOID_CXX11 */ |
182 |
|
168 |
|
183 |
// Just a pithier wrapper for enable_if_t. |
169 |
// Just a pithier wrapper for enable_if_t. |
184 |
#define SK_WHEN(condition, T) skstd::enable_if_t<!!(condition), T> |
170 |
#define SK_WHEN(condition, T) skstd::enable_if_t<!!(condition), T> |