mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1250196 - Part 1: Import mozilla::Forward and mozilla::UniqePtr into the std namespace in a way that is compatible with libc++; r=lsalzman
This commit is contained in:
parent
c048c0b00d
commit
195eeef0a1
@ -32,10 +32,23 @@
|
||||
#include "mozilla/Function.h"
|
||||
#endif
|
||||
|
||||
namespace std {
|
||||
// In libc++, symbols such as std::forward may be defined in std::__1.
|
||||
// The _LIBCPP_BEGIN_NAMESPACE_STD and _LIBCPP_END_NAMESPACE_STD macros
|
||||
// will expand to the correct namespace.
|
||||
#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#define MOZ_BEGIN_STD_NAMESPACE _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#define MOZ_END_STD_NAMESPACE _LIBCPP_END_NAMESPACE_STD
|
||||
#else
|
||||
#define MOZ_BEGIN_STD_NAMESPACE namespace std {
|
||||
#define MOZ_END_STD_NAMESPACE }
|
||||
#endif
|
||||
|
||||
MOZ_BEGIN_STD_NAMESPACE
|
||||
using mozilla::Forward;
|
||||
#define forward Forward
|
||||
MOZ_END_STD_NAMESPACE
|
||||
|
||||
namespace std {
|
||||
#if SKIA_IMPLEMENTATION
|
||||
using mozilla::IntegralConstant;
|
||||
using mozilla::IsEmpty;
|
||||
|
@ -15,6 +15,11 @@
|
||||
#ifdef MOZ_SKIA
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
namespace std {
|
||||
using mozilla::DefaultDelete;
|
||||
using mozilla::UniquePtr;
|
||||
}
|
||||
|
||||
namespace skstd {
|
||||
using mozilla::DefaultDelete;
|
||||
using mozilla::UniquePtr;
|
||||
|
Loading…
Reference in New Issue
Block a user