Further macro protection by replacing _[A-Z] with _[A-Z]p

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-11-29 18:15:50 +00:00
parent 66c6f9733b
commit 9996844df0
38 changed files with 2831 additions and 2831 deletions

View File

@@ -21,20 +21,20 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _N> class _LIBCPP_HIDDEN __sso_allocator;
template <class _Tp, size_t _Np> class _LIBCPP_HIDDEN __sso_allocator;
template <size_t _N>
class _LIBCPP_HIDDEN __sso_allocator<void, _N>
template <size_t _Np>
class _LIBCPP_HIDDEN __sso_allocator<void, _Np>
{
public:
typedef const void* const_pointer;
typedef void value_type;
};
template <class _Tp, size_t _N>
template <class _Tp, size_t _Np>
class _LIBCPP_HIDDEN __sso_allocator
{
typename aligned_storage<sizeof(_Tp) * _N>::type buf_;
typename aligned_storage<sizeof(_Tp) * _Np>::type buf_;
bool __allocated_;
public:
typedef size_t size_type;
@@ -43,14 +43,14 @@ public:
_LIBCPP_INLINE_VISIBILITY __sso_allocator() throw() : __allocated_(false) {}
_LIBCPP_INLINE_VISIBILITY __sso_allocator(const __sso_allocator&) throw() : __allocated_(false) {}
template <class _Up> _LIBCPP_INLINE_VISIBILITY __sso_allocator(const __sso_allocator<_Up, _N>&) throw()
template <class _Up> _LIBCPP_INLINE_VISIBILITY __sso_allocator(const __sso_allocator<_Up, _Np>&) throw()
: __allocated_(false) {}
private:
__sso_allocator& operator=(const __sso_allocator&);
public:
_LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, typename __sso_allocator<void, _N>::const_pointer = 0)
_LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, typename __sso_allocator<void, _Np>::const_pointer = 0)
{
if (!__allocated_ && __n <= _N)
if (!__allocated_ && __n <= _Np)
{
__allocated_ = true;
return (pointer)&buf_;