summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/__sso_allocator
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2012-03-14 00:09:36 +0000
committertheraven <theraven@FreeBSD.org>2012-03-14 00:09:36 +0000
commit7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19 (patch)
tree077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/include/__sso_allocator
parentd83b894ff4280333de5ef40496cfd061b515ba54 (diff)
parentbaa75b9984d33ea49ffb76a73507b64d879166cc (diff)
downloadFreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.zip
FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.tar.gz
Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++! Approved by: dim (mentor)
Diffstat (limited to 'contrib/libc++/include/__sso_allocator')
-rw-r--r--contrib/libc++/include/__sso_allocator16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libc++/include/__sso_allocator b/contrib/libc++/include/__sso_allocator
index 16354d8..7240072 100644
--- a/contrib/libc++/include/__sso_allocator
+++ b/contrib/libc++/include/__sso_allocator
@@ -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_;
OpenPOWER on IntegriCloud