History log of /external/libcxx/include/memory
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b7fd0be37076c8fe5a26a5850580426bcd4c0740 17-Feb-2017 Eric Fiselier <eric@efcs.ca> Update all bug URL's to point to https://bugs.llvm.org/...

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
b4d17ade8956ef2c77cbb6e7cd9461edd1f58bca 24-Jan-2017 Marshall Clow <mclow.lists@gmail.com> Remove auto_ptr in C++17. Get it back by defining _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
952eaecfc6fa504c40d6f7220d8c017d014cda0c 21-Jan-2017 Eric Fiselier <eric@efcs.ca> Implement P0513R0 - "Poisoning the Hash"

Summary:
Exactly what the title says.

This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it.

See http://wg21.link/P0513R0 for more info.

If there are no comments in the next couple of days I'll commit this

Reviewers: mclow.lists, K-ballo, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D28938

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a7ae303de36dfa1e0a165c52cd073c51dc85e8cb 17-Jan-2017 Eric Fiselier <eric@efcs.ca> Add ABI option to remove recently inlined __shared_count functions from the library.

In order to allow inlining of previously out-of-line functions without an ABI break
libc++ provides legacy definitions in the dylib that old programs can
continue to use. Unfortunatly Windows link.exe detects this hack and diagnoses the duplicate
definitions.

This patch disable the duplicate definitions on Windows by adding an ABI option
which disables all "legacy out-of-line symbols"

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
9133eadd600f539e0719a23a8848504e4809c70c 17-Jan-2017 Eric Fiselier <eric@efcs.ca> Fix DLL build by removing _LIBCPP_FUNC_VIS from member of class marked dllexport

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8993759ae957800a061e60d1809482efb03e3ba3 17-Jan-2017 Kevin Hu <hxy9243@gmail.com> [Test patch] Inline hot functions in libcxx shared_ptr

Moves hot functions such as atomic add into the memory header file
so that they can be inlined, which brings performance benefits.

Patch by Kevin Hu, Aditya Kumar, Sebastian Pop

Differential Revision: https://reviews.llvm.org/D24991


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
bfcceeeadf615ac6ae1b003c42c97f53dc5c0777 14-Jan-2017 Eric Fiselier <eric@efcs.ca> Remove unused parameters in C++03

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
bd7c88461bf08a50036700100def7d555c20da48 10-Jan-2017 Marshall Clow <mclow.lists@gmail.com> Qualify some type names that I thought were fine, but some of the bots don't like.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
f6c0b90773292cd20f343242cd4806b8232b6837 10-Jan-2017 Marshall Clow <mclow.lists@gmail.com> Fix up some mismatched SFINAE conditionsin shared_ptr; some used '_Tp*', others used 'element_type *'. Today, they're the same - but soon they won't be. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8fe92cc0c9d18f61723ac89b5ccfd307ed7ecbca 09-Jan-2017 Dimitry Andric <dimitry@andric.com> Move _PairT declaration out of __hash_combine to avoid warning under C++98

Summary:
Some parts of the FreeBSD tree are still compiled with C++98, and until
rL288554 this has always worked fine. After that, a complaint about the
newly introduced local _PairT is produced:

/usr/include/c++/v1/memory:3354:27: error: template argument uses local type '_PairT' [-Werror,-Wlocal-type-template-args]
typedef __scalar_hash<_PairT> _HashT;
^~~~~~
/usr/include/c++/v1/memory:3284:29: error: template argument uses local type '_PairT' [-Werror,-Wlocal-type-template-args]
: public unary_function<_Tp, size_t>
^~~
/usr/include/c++/v1/memory:3356:12: note: in instantiation of template class 'std::__1::__scalar_hash<_PairT, 2>' requested here
return _HashT()(__p);
^

As far as I can see, there should be no problem moving the _PairT
struct to just before the __hash_combine() function, which fixes this
particular warning.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits, emaste

Differential Revision: https://reviews.llvm.org/D28472


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
32b19c3d9fdde3d93288593ae7492ec837e87967 07-Jan-2017 Eric Fiselier <eric@efcs.ca> [libc++] Tolerate presence of __deallocate macro

Summary:
On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK.

This patch renames all usages of `__deallocate` internally as to not conflict with the macro.

Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D28426

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
c3dfeced41bc6e9307cd9156ec360e30f6223933 05-Jan-2017 Eric Fiselier <eric@efcs.ca> Fix PR26961 - Add default constructor to std::pointer_safety struct.

In ABI v1 libc++ implements std::pointer_safety as a class type instead
of an enumeration. However this class type does not provide
a default constructor as it should. This patch adds that default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
46a0c2ef0cfee26a9c56d61763693966346a00e5 05-Jan-2017 Eric Fiselier <eric@efcs.ca> Fix std::pointer_safety type in ABI v2

In the C++ standard `std::pointer_safety` is defined
as a C++11 strongly typed enum. However libc++ currently defines
it as a class type which simulates a C++11 enumeration. This
can be detected in valid C++ code.

This patch introduces an the _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE ABI option.
When defined `std::pointer_safety` is implemented as an enum type.
Unfortunatly this also means it can no longer be provided as an extension
in C++03.

Additionally this patch moves the definition for `get_pointer_safety()`
out of the dylib, and into the headers. New usages of `get_pointer_safety()`
will now use the inline version instead of the dylib version. However in
order to keep the dylib ABI compatible the old definition is explicitly
compiled into it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
c3589a8305a317cfa0757bc5f4136a7b93684d23 05-Jan-2017 Eric Fiselier <eric@efcs.ca> [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS

The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both
_LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to
__attribute__((__type_visibility__)) with Clang. The only remaining difference
is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas
_LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on
templates).

This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
0e5ebbc77c3c2cfd7d835fcfe40fcb65df0c5598 24-Dec-2016 Eric Fiselier <eric@efcs.ca> Fix unused parameters and variables

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a2ff7987451950c70dea4786272802fbbd8a3751 03-Dec-2016 Eric Fiselier <eric@efcs.ca> Fix C++03 build

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
120401a4e033c11adf325dc786b7d5893a7c001d 03-Dec-2016 Eric Fiselier <eric@efcs.ca> Make variant's index part of the hash value

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8c57032b5226baa44165e18b17a02c2c6ed3dcbb 18-Nov-2016 Eric Fiselier <eric@efcs.ca> Remove _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS

libc++ no longer supports C++11 compilers that don't implement `= default`.
This patch removes all instances of the feature test macro
_LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS as well as the potentially dead code it hides.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
db7fa111abe868b217443bcaafc47de53bdb0e48 14-Nov-2016 Marshall Clow <mclow.lists@gmail.com> Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted last week in Issaquah

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
05577c82e16e2bb03242be5e36f57d63f5854f89 11-Oct-2016 Eric Fiselier <eric@efcs.ca> Fix incorrect exception handling behavior in the uninitialized algorithms

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4e3e15ad994eab09d83c1d5602597babca1d2756 25-Sep-2016 Eric Fiselier <eric@efcs.ca> [libc++] Remove various C++03 feature test macros

Summary:
Libc++ still uses per-feature configuration macros when configuring for C++11. However libc++ requires a feature-complete C++11 compiler so there is no reason to check individual features. This patch starts the process of removing the feature specific macros and replacing their usage with `_LIBCPP_CXX03_LANG`.

This patch removes the __config macros:

* _LIBCPP_HAS_NO_TRAILING_RETURN
* _LIBCPP_HAS_NO_TEMPLATE_ALIASES
* _LIBCPP_HAS_NO_ADVANCED_SFINAE
* _LIBCPP_HAS_NO_DEFAULT_FUNCTION_TEMPLATE_ARGS
* _LIBCPP_HAS_NO_STATIC_ASSERT

As a drive I also changed our C++03 static_assert to use _Static_assert if available.

I plan to commit this without review if nobody voices an objection.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D24895

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@282347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4dbd4fcf8626453949625bf36976e668094cfbb1 04-Sep-2016 Kuba Brecka <kuba.brecka@gmail.com> [libcxx] Fix a data race in call_once

call_once is using relaxed atomic load to perform double-checked locking, which contains a data race. The fast-path load has to be an acquire atomic load.

Differential Revision: https://reviews.llvm.org/D24028



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
e7acb0e5be91c8e6ded934184f4053757c5f5360 25-Aug-2016 Marshall Clow <mclow.lists@gmail.com> Followon to r279744. Find the other exception types and make __throw_XXX routines (and call them). Remove the generic __libcpp_throw routine, since no one uses it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
14c09a2413ed5cc4914d1690f5dbfb9420a45b3c 25-Aug-2016 Marshall Clow <mclow.lists@gmail.com> Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
c672a7453d354811645723629765daa42f7dfa6a 24-Jul-2016 Eric Fiselier <eric@efcs.ca> Implement P0040r3: Extending memory management tools

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
51d7e8e38165ba367882161b9b7f88e7255c65aa 11-Jul-2016 Marshall Clow <mclow.lists@gmail.com> Always use the allocator to construct/destruct elements of a deque/vector. Fixes PR#28412. Thanks to Jonathan Wakely for the report.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@275105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
83d7ca9ea53bbdd32863c0a5ca04a1c47b50e94f 27-Jun-2016 Eric Fiselier <eric@efcs.ca> Implement P0163r0. Add shared_ptr::weak_type.

This patch adds the weak_type typedef in shared_ptr. It is available in
C++17 and newer.

This patch also updates the _LIBCPP_STD_VER and TEST_STD_VER macros to
have the value of 16, since 2016 is the current year.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
783876859372a9c2bd54e206ceee34977c692b71 27-Jun-2016 Eric Fiselier <eric@efcs.ca> Fix PR27115 - enable_shared_from_this does not work as a virtual base class.

See https://llvm.org/bugs/show_bug.cgi?id=27115

The problem was that the conversion from
'const enable_shared_from_this<T>*' to 'const T*' didn't work if
T inherited enable_shared_from_this as a virtual base class. The fix
is to take the original pointer passed to shared_ptr's constructor in the
__enable_weak_this method and perform an upcast to 'const T*' instead of
performing a downcast from the enable_shared_from_this base.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
ba9dccd902a8276e17a066e9e635fb2cc9a34d1f 18-Jun-2016 Eric Fiselier <eric@efcs.ca> Enable building and using atomic shared_ptr for GCC.

Summary:
Currently the implementation of [util.smartptr.shared.atomic] is provided only when using Clang, and not with GCC. This is a relic of not having a GCC implementation of <atomic>, even though <atomic> isn't actually used in the implementation. This patch enables support for atomic shared_ptr functions when using GCC.

Note that this is not a header only change. Previously only Clang builds of libc++.so would provide the required symbols. There is no reason for this restriction.
After this change both Clang and GCC builds should be binary compatible with each other WRT these symbols.


Reviewers: mclow.lists, rmaprath, EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D21407

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
b36940bb348883969466a3514418c5501cdd8140 02-Jun-2016 Eric Fiselier <eric@efcs.ca> Fix leak in __enable_weak_this(). Thanks to Arthur O'Dwyer for finding it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
18e1ea69ae04be16072d0c781bc8b7c342c2a7ff 02-Jun-2016 Eric Fiselier <eric@efcs.ca> Implement P0033R1 - Re-enabling shared_from_this

Summary: See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0033r1.html

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D19254

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
2241cf0d5b5f18a51877b8fa4bcccde92fa675ad 18-May-2016 Marshall Clow <mclow.lists@gmail.com> Change the control flow in atomic_compare_exchange_strong to avoid a potential deadlock.

When you assign a shared_ptr, the deleter gets called and assigned. In this routine, the assignment happens inside a critical section, which could (potentially) lead to a deadlock, if the deleter did something wonky. Now we swap the old value with an (empty) temporary shared_ptr, and then let the temporary delete the old value when it goes out of scope (after the lock has been released). This should fix PR#27724. Thanks to Hans Boehm for the bug report and the suggested fix.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4db388b579686bce48b89d7a82b48561df93e3e9 07-May-2016 Eric Fiselier <eric@efcs.ca> Change allocator<T>::allocate to throw length_error, not bad_alloc

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8f1e73dfd2581000748652489c33198b312a78bb 22-Apr-2016 Eric Fiselier <eric@efcs.ca> Add is_swappable/is_nothrow_swappable traits

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
566bcb4badb37b8af790d8b09ef71fb8b9d82026 22-Apr-2016 Eric Fiselier <eric@efcs.ca> Fix most GCC attribute ignored warnings

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4951a48a6a8d7fb815b96f2f9ba9276877198c24 03-Mar-2016 Marshall Clow <mclow.lists@gmail.com> Fix for PR26812: possible overflow issue in std::allocator::allocate

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@262610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
61d4dd0390570ed1e37ced76613fa3259276cd96 25-Feb-2016 Marshall Clow <mclow.lists@gmail.com> Another chunk of N4089

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
7a3731f82b60dd1a9483cd94c712a3a1cd2e87a4 11-Jan-2016 Marshall Clow <mclow.lists@gmail.com> Preemptively disable unsigned integer sanitization in 32 and 64 bit versions of __murmur2_or_cityhash. This lets people use the unsigned integer overflow checker in UBSAN w/o getting hits from libc++'s hash code (where the unsigned integer overflow is legal and deliberate)> Patch by @danielaustin. Reviewed as: http://reviews.llvm.org/D15973

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@257368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
28c02db8d76d5b9b9874c8347b4697bec29595b6 09-Dec-2015 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add 3 more missing inline/visibility attributes.

These are the cases when an out-of-class definition of a method is
marked _LIBCPP_INLINE_VISIBILITY, but the in-class declaration is
not. This will start failing when (or if) we switch to
attribute((internal_linkage)).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
3f159e874c5c4d86f244d5950fe1114d8d7f6346 12-Nov-2015 Marshall Clow <mclow.lists@gmail.com> Implement P0074: Making owner_less more flexible

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a3b25f81d131a94dce8b13b2b7b30a3d35c94022 07-Nov-2015 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Cleanup: move visibility/linkage attributes to the first declaration.

This change moves visibility attributes from out-of-class method
definitions to in-class declaration. This is needed for a switch to
attribute((internal_linkage)) (see http://reviews.llvm.org/D13925)
which can only appear on the first declaration.

This change does not touch istream/ostream/streambuf. They are
handled separately in http://reviews.llvm.org/D14409.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
88fa03a06e41b601c56d5696d81c08462ba820a6 25-Oct-2015 Marshall Clow <mclow.lists@gmail.com> Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
332ab91947eabf73bc8feabeff5fdcf71659b245 25-Oct-2015 Marshall Clow <mclow.lists@gmail.com> Fix LWG#2127: Move-construction with raw_storage_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
aff153a8cd0119ef9e60d2c01760796f938f7c9a 28-Aug-2015 Eric Fiselier <eric@efcs.ca> [libcxx] Constrain unique_ptr::operator=(unique_ptr<Tp, Dp>) in C++03 mode

Summary:
This patch properly constrains the converting assignment operator in C++03. It also fixes a bug where std::forward was given the wrong type.
The following two tests begin passing in C++03:

* `unique_ptr.single.asgn/move_convert.pass.cpp`
* `unique_ptr.single.asgn/move_convert13.fail.cpp`

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12173

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@246272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
bb2f28e15d3666b9316bf77ced071f16fa0fc70e 23-Aug-2015 Eric Fiselier <eric@efcs.ca> Recommit rL245802: Cleanup fancy pointer rebinding in list using __rebind_pointer.

Currently we need an #ifdef branch every time we use pointer traits to rebind a pointer because
it is done differently in C++11 and C++03. This patch introduces the __rebind_pointer utility to
clean this up.

Also add a test that list and it's iterators can be instantiated with incomplete element types.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
d686dda62e7da9958c6b82716bb8480f83ff40d0 23-Aug-2015 Eric Fiselier <eric@efcs.ca> Revert r245802. It violates the incomplete type requirements.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a276cb01bef3c950e142838d0db61d6a6e460117 23-Aug-2015 Eric Fiselier <eric@efcs.ca> Cleanup fancy pointer rebinding in list using __rebind_pointer.

Currently we need an #ifdef branch every time we use pointer traits to rebind a pointer because
it is done differently in C++11 and C++03. This patch introduces the __rebind_pointer utility to
clean this up.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
00f4a49b0b76dea78a68ea2dd7333408f52caa5b 19-Aug-2015 Eric Fiselier <eric@efcs.ca> [libcxx] Allow use of <atomic> in C++03. Try 3.

Summary:
After putting this question up on cfe-dev I have decided that it would be best to allow the use of `<atomic>` in C++03. Although static initialization is a concern the syntax required to get it is C++11 only. Meaning that C++11 constant static initialization cannot silently break in C++03, it will always cause a syntax error. Furthermore `ATOMIC_VAR_INIT` and `ATOMIC_FLAG_INIT` remain defined in C++03 even though they cannot be used because C++03 usages will cause better error messages.

The main change in this patch is to replace `__has_feature(cxx_atomic)`, which only returns true when C++ >= 11, to `__has_extension(c_atomic)` which returns true whenever clang supports the required atomic builtins.


This patch adds the following macros:
* `_LIBCPP_HAS_C_ATOMIC_IMP` - Defined on clang versions which provide the C `_Atomic` keyword.
* `_LIBCPP_HAS_GCC_ATOMIC_IMP` - Defined on GCC > 4.7. We must use the fallback atomic implementation.
* `_LIBCPP_HAS_NO_ATOMIC_HEADER` - Defined when it is not safe to include `<atomic>`.

`_LIBCPP_HAS_C_ATOMIC_IMP` and `_LIBCPP_HAS_GCC_ATOMIC_IMP` are mutually exclusive, only one should be defined. If neither is defined then `<atomic>` is not implemented and including `<atomic>` will issue an error.

Reviewers: chandlerc, jroelofs, mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11555

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
d434e2a53545352bbeb551ce5067b8e21b7bd574 18-Aug-2015 Marshall Clow <mclow.lists@gmail.com> Broke C++03 compatibility in 245330. Fix that.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
af961ed8cf29ca8cadce4b96082c350d44e347c2 18-Aug-2015 Marshall Clow <mclow.lists@gmail.com> implement more of N4258 - Cleaning up noexcept in the standard library. Specifically add new noexcept stuff to vector and string's move-assignment operations

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
692177d02224b462b98ec2d38dcac30092e915dc 18-Jul-2015 Eric Fiselier <eric@efcs.ca> Enable and fix warnings during the build.

Although CMake adds warning flags, they are ignored in the libc++ headers
because the headers '#pragma system header' themselves.

This patch disables the system header pragma when building libc++ and fixes
the warnings that arose.

The warnings fixed were:
1. <memory> - anonymous structs are a GNU extension
2. <functional> - anonymous structs are a GNU extension.
3. <__hash_table> - Embedded preprocessor directives have undefined behavior.
4. <string> - Definition is missing noexcept from declaration.
5. <__std_stream> - Unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
cd6ed54fedd042d301b19b484ceb14b7d83b3ede 16-Jul-2015 Marshall Clow <mclow.lists@gmail.com> Make sure that __libcpp_compressed_pair_imp default-constructs its' members, rather than value-initializing them. Fixes PR#24137

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
7d914d1bfffac32da13a44871fc17b8ba3ade57a 13-Jul-2015 Marshall Clow <mclow.lists@gmail.com> Implement the first part of N4258: 'Cleaning up noexcept in the Library'. This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
c6e466911f803e85548887c3acb50d6fa5c4b071 07-Jul-2015 Eric Fiselier <eric@efcs.ca> [libcxx] Add atomic_support.h header to src that handles needed atomic operations.

Summary:
In some places in libc++ we need to use the `__atomic_*` builtins. This patch adds a header that provides access to those builtins in a uniform way from within the dylib source.

If the compiler building the dylib does not support these builtins then a warning is issued.

Only relaxed loads are needed within the headers. A singe function to do these relaxed loads has been added to `<memory>`.

This patch applies the new atomic builtins to `__shared_count` and `call_once`.

Reviewers: mclow.lists

Subscribers: majnemer, jroelofs, cfe-commits

Differential Revision: http://reviews.llvm.org/D10406

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
b81d6f5b8d1675887d440a04ef2b0de9157de7cb 01-Jul-2015 Marshall Clow <mclow.lists@gmail.com> Noticed that std::allocator<const T> was missing the definition for is_always_equal. Fixed this, and added a test for it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
46d06b90c12482c6b62fff2b39dfbc7acc394deb 19-Jun-2015 Marshall Clow <mclow.lists@gmail.com> Fix illegal chars that snuck into <memory>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@240163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
cb126215aa371c10e3b10fa70044d9edc385a768 19-Jun-2015 Marshall Clow <mclow.lists@gmail.com> Fix ASAN bot; missing bookkeeping in r240136.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@240139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
c41133728d1a4197b8d0a366854b73d161788d20 19-Jun-2015 Marshall Clow <mclow.lists@gmail.com> Fix PR#18843. Thanks to Howard for the fix

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@240136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
3a0e430cd45bcaba88d5eb001b7f4865d904b6a6 13-Jun-2015 Eric Fiselier <eric@efcs.ca> [libcxx] Fix detection of __is_final.

Summary: Currently we only enable the use of __is_final(...) with Clang. GCC also provides __is_final(...) since 4.7 in all standard modes. This patch creates the macro _LIBCPP_HAS_IS_FINAL to note the availability of `__is_final`.

Reviewers: danalbert, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8795

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@239664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
f0324bcaa1ff97aabb6ba57d58d603af294d6476 02-Jun-2015 Marshall Clow <mclow.lists@gmail.com> Implement the first part of N4258 - allocator_traits<X>::is_always_equal. Also fixes PR#23723

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
56523ff60ebfc5aaff8c10ae2c6f5f2dd8c5512c 02-Jun-2015 Marshall Clow <mclow.lists@gmail.com> In the case where we are copying/moving zero elements, do less work

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
ebc31694e814d19b0d3a86533c73d3277069a5ed 31-May-2015 Marshall Clow <mclow.lists@gmail.com> Remove debugging code

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
bf0460e0a0045dcf418fc065d5bf0875f77f3bbf 31-May-2015 Marshall Clow <mclow.lists@gmail.com> Don't try to memcpy zero bytes; sometimes the source pointer is NULL, and that's UB. Thanks to Nuno Lopes for the catch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
60784f62deefe20952cabe220eb3f14b20c5e659 28-May-2015 Marshall Clow <mclow.lists@gmail.com> Fix PR#23647 - make_shared<volatile bool> - second try

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
fc3a3ffc69e6123b4e7e789a0ab93a287a622760 27-May-2015 Marshall Clow <mclow.lists@gmail.com> Revert 238354 while I figure out what broke in weak_ptr

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
83f8153b22bf793b3459be9e60d7c135284d5f79 27-May-2015 Marshall Clow <mclow.lists@gmail.com> Fix PR#23647 - make_shared<volatile bool>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@238354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
5dce73dd6e4d6b6eb522e813558b2d8a350e50f1 19-May-2015 Marshall Clow <mclow.lists@gmail.com> Implement LWG2433: uninitialized_copy()/etc. should tolerate overloaded operator&

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
0ad232a8826f08d3a1e6a217ecf58a300960439a 10-May-2015 Marshall Clow <mclow.lists@gmail.com> Fix for LWG Issue 2415: Inconsistency between unique_ptr and shared_ptr

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@236953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
dbaf7a0d31ac7d5e3121686f1e771d558d62a34b 10-May-2015 Marshall Clow <mclow.lists@gmail.com> Fix for LWG2454: Add raw_storage_iterator::base() member

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@236948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
66302c650b16a0b8134a50e0fe368d1d69952863 07-Apr-2015 Marshall Clow <mclow.lists@gmail.com> In many places, there was an #ifdef/#else block that selected one of two implmentations of rebind_alloc based on whether or not we had template aliases. Create a helper struct to encapsulate that bit of logic, and replace all the ifdefs with uses of that struct. No functionality change intented.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@234296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
088ed9fe946997f94682ee53d586b8c3d118e211 31-Mar-2015 Eric Fiselier <eric@efcs.ca> [libcxx] Optimize vectors uninitialized construction of trivial types from an iterator range.

Summary:
In certain cases vector can use memcpy to construct a range of elements at the back of the vector. We currently don't do this resulting in terrible code gen in non-optimized mode and a
very large slowdown compared to libstdc++.

This patch adds a `__construct_forward_range(Allocator, Iter, Iter, _Ptr&)` and `__construct_forward_range(Allocator, Tp*, Tp*, Tp*&)` functions to `allocator_traits` which act similarly to the existing `__construct_forward(...)` functions.

This patch also changes vectors `__construct_at_end(Iter, Iter)` to be `__construct_at_end(Iter, Iter, SizeType)` where SizeType is the size of the range. `__construct_at_end(Iter, Iter, SizeType)` now calls `allocator_traits<Tp>::__construct_forward_range(...)`.

This patch is based off the design of `__swap_out_circular_buffer(...)` which uses `allocator_traits<Tp>::__construct_forward(...)`.

On my machine this code performs 4x better than the current implementation when tested against `std::vector<int>`.



Reviewers: howard.hinnant, titus, kcc, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8109

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
f1b30c41adaeaf5e0ab8dc10e26832789bd08097 13-Feb-2015 Saleem Abdulrasool <compnerd@compnerd.org> Handle function name conflicts in _LIBCPP_MSVCRT mode

Visual Studio's SAL extension uses a macro named __deallocate. This macro is
used pervasively, and gets included through various different ways. This
conflicts with the similarly named interfaces in libc++. Introduce a undef
header similar to __undef_min_max to handle this. This fixes a number of errors
due to the macro replacing the function name.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8492cd84ff183224dbbc650933ce10964de45608 06-Feb-2015 Eric Fiselier <eric@efcs.ca> Remove use of _[A-Z] identifiers and poison them to detect usage

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4b3ca8c2493da4bf0cfc50402be14f063a8701f7 17-Nov-2014 Marshall Clow <mclow.lists@gmail.com> Implement LWG2400 - 'shared_ptr's get_deleter() should use addressof()', and add tests. Mark LWG2400 and LWG2404 as complete

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
3f5579f0b228326052d9f0f3b01d3deef360fd23 11-Nov-2014 Marshall Clow <mclow.lists@gmail.com> Fix typo in allocator_traits::construct. This fixes PR14175, which shows up if an allocator has a no-args construct method

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@221697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4e7d53664dbe78eecc04f4e0ba0980bb9641ad8e 23-Oct-2014 Eric Fiselier <eric@efcs.ca> Add support for "fancy" pointers to shared_ptr. Fixes PR20616

Summary:
This patch add support for "fancy pointers/allocators" as well as fixing support for shared_pointer and "minimal" allocators.

Fancy pointers are class types that meet the NullablePointer requirements. In our case they are created by fancy allocators. `support/min_allocator.h` is an archetype for these types.

There are three types of changes made in this patch:
1. `_Alloc::template rebind<T>::other` -> `__allocator_traits_rebind<_Alloc, T>::type`. This change was made because allocators don't need a rebind template. `__allocator_traits_rebind` is used instead of `allocator_traits::rebind` because use of `allocator_traits::rebind` requires a workaround for when template aliases are unavailable.
2. `a.deallocate(this, 1)` -> `a.deallocate(pointer_traits<self>::pointer_to(*this), 1)`. This change change is made because fancy pointers aren't always constructible from raw pointers.
3. `p.get()` -> `addressof(*p.get())`. Fancy pointers aren't actually a pointer. When we need a "real" pointer we take the address of dereferencing the fancy pointer. This should give us the actual raw pointer.

Test Plan: Tests were added using `support/min_allocator.h` to each affected shared_ptr overload and creation function. These tests can only be executed in C++11 or greater since min_allocator is only available then. A extra test was added for the non-variadic versions of allocate_shared.

Reviewers: danalbert, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4859

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8d86b2e6867297fb2109824c67c50de67f3a31f2 05-Sep-2014 Jonathan Roelofs <jonathan@codesourcery.com> Allow libc++ to be built on systems without POSIX threads

If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.

http://reviews.llvm.org/D3969


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
394451db81995a3a4a2645924ee4ac7829b90189 30-Jun-2014 Marshall Clow <mclow.lists@gmail.com> Fix a typo in the noexcept calculation for __compressed_pair::swap. Thanks to EricWF for the bug report and the fix.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
ba6dbf486612e6bc312a231e78f5e132e0519d70 24-Jun-2014 Marshall Clow <mclow.lists@gmail.com> Some calls to get<>() were qualified. Some were not. Qualify them all. Fixes bug #20092. Thanks to Agustín Bergé for the bug report and the fix.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@211563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
73c1fce21cb164d035ae2d432b30556127a2e836 04-Jun-2014 Richard Smith <richard-llvm@metafoo.co.uk> Use __builtin_operator_new/__builtin_operator_delete when available. This
allows allocations and deallocations to be optimized out.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
5f64a2b3c349920f44394ea7d19f59fe856775de 26-Apr-2014 Marshall Clow <mclow.lists@gmail.com> Fix bug #18350. Add tests for tuples of all the smart pointers (except auto_ptr)

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@207307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
23ef15161479092c88ef24a6f8c80ca54119367a 05-Mar-2014 Marshall Clow <mclow.lists@gmail.com> Update synposis in <memory> to show move semantics for weak_ptr; add tests for already existing move semantics. Mark LWG issues #2315 (no changes needed), 2316 (move semantics for weak_ptr), 2252 (previous commit) and 2271 (previous commit) as complete.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
e1678a18d957b91855aadcd3186f21bd142959e0 31-Jan-2014 Logan Chien <tzuhsiang.chien@gmail.com> Remove default function template argument from the header.

GCC will treat the default function template arguments as a
compilation error if C++0x is not enabled.

This commit workaround the compilation error by moving the
SFINAE check to function argument instead of the template
argument.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
3f81e9eebaf662f230d3dff7329098df6ee7e36d 13-Nov-2013 Howard Hinnant <hhinnant@apple.com> This fixes a very subtle ABI problem concerning the copy constructor of
pair, and a couple of pair-like implementation detail types. The
C++98/03 and 11 standards all specify that the copy constructor of
pair<int, int> is trivial. However as libc++ tracked the draft C++11
standard over the years, this copy constructor became non-trivial, and
then just recently was corrected back to trivial for C++11.

Unfortunately (for libc++1) the Itanium ABI specifies different calling
conventions for trivial and non-trivial copy constructors. Therefore
currently the C++03 libc++ copy constructor for pair<int, int> is ABI
incompatible with the C++11 libc++ copy constructor for pair<int, int>.
This is Bad(tm). This patch corrects the situation by making this copy
constructor trivial in C++03 mode as well.

Just in case it is needed for an incomplete C++11 compiler, libc++
retains the ability to support pair with rvalue references, but without
defaulted special members. However the pair needs non-trivial special
members to implement this special case, (as it did when clang was in
this place a couple of years ago).

During this work a bug was also found and fixed in
is_trivially_constructible.

And there is a minor drive-by fix in <__config> regarding
__type_visibility__.

A test is updated to ensure that the copy constructor of pair<int, int>
is trivial in both C++03 and C++11. This test will necessarily fail for
a compiler that implements rvalue references but not defaulted special
members.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8127758024da92cae589292d763aedc86fa3d34c 21-Sep-2013 Howard Hinnant <hhinnant@apple.com> David Chisnall: macro protect 'test' in __has_pointer_type_imp.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
37c4acfe5e73271fa9c08148c9bb1de79f6a2d5a 14-Sep-2013 Howard Hinnant <hhinnant@apple.com> G M: Make shared_ptr a little more gentle for some compilers. No impact on clang.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
1b5f3adcef171c28e832363139aab86f08e80b36 03-Sep-2013 Marshall Clow <mclow.lists@gmail.com> Updated the synopsis for weak_ptr<T>::owner_before to match the code. No code changes.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
08b4f3f99b3414503a127e34db4ab1a3abb966f3 27-Aug-2013 Marshall Clow <mclow.lists@gmail.com> LWG Issue 2162: mark allocator_traits::maxsize as noexcept

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
0f678bd69ef6428e6c75ae1b43fcf1543df63cda 12-Aug-2013 Howard Hinnant <hhinnant@apple.com> Nico Rieck: this patch series fixes visibility issues on Windows as explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a4e87abbb90c54b1a1ce5a2f28dac19793c605a8 08-Aug-2013 Howard Hinnant <hhinnant@apple.com> My previous reorganization of addressof broke -std=c++03. Thanks much to Arnold Schwaighofer for catching this. This patch also catches a few more missing addressof in <future>, thanks go to Zhihao Yuan for catching these.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a709c823f75046fa9c0c03e6177c7b2fe7a30915 08-Aug-2013 Arnold Schwaighofer <aschwaighofer@apple.com> Revert r187927.

Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.

It breaks a clang bootstrap.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
d8bfe7ba56998a50209e6f5685a4ae15b80cdba0 08-Aug-2013 Howard Hinnant <hhinnant@apple.com> Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
24ae8f8e5b96bd7825ccdee40de2b45c8db66341 03-Jul-2013 Howard Hinnant <hhinnant@apple.com> Matthew Dempsky: Attached patch replaces the type punning with memcpy(), which on
x86/x86-64 clang optimizes to direct word accesses anyway. This fixes an unaligned word access in murmurhash/cityhash.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
fb5511027bf55412aed2bdd944914729381264ef 02-Jul-2013 Marshall Clow <mclow.lists@gmail.com> Adorn make_unique with visibility and inline attributes

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
fd7481e96de307dd0e43c96d5b025b7c779f72d7 01-Jul-2013 Marshall Clow <mclow@qualcomm.com> Implement n3656 - make_unique. Thanks to Howard for the review and suggestions.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
9360e9f9440484d1723cd1c1ef6fc66d2e7d2bed 07-Jun-2013 Howard Hinnant <hhinnant@apple.com> Minor bug fix for allowing an extension of const-qualified types in containers.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@183481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8c238192205e8d0ae6bd3ff8b5176de818ebda7b 06-May-2013 Howard Hinnant <hhinnant@apple.com> Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
05e7d24b3df0ea1486ff27a52e77132e1a683e1d 24-Apr-2013 Howard Hinnant <hhinnant@apple.com> default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4313ec39753e34df422687e071b82c12b79e5eec 16-Apr-2013 Howard Hinnant <hhinnant@apple.com> addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
83eade6abb414e0e814977921bcb6e46853cae03 07-Mar-2013 Howard Hinnant <hhinnant@apple.com> No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
4a0e74fff824876315160bf2da2d2b6ffc3ec52b 25-Feb-2013 Howard Hinnant <hhinnant@apple.com> Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
f619e230cc953786d9b41904fa97e465c53c3aab 11-Jan-2013 Howard Hinnant <hhinnant@apple.com> Fix exception safety bug in vector::push_back

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
9c0df1416f2cec1cc6cce797d18ddc5e50b64797 30-Oct-2012 Howard Hinnant <hhinnant@apple.com> Rename uses of _ and __ because these are getting stepped on by macros from other system code.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
33be35effe82ca5a7a2b285fb9d8176dd94e5e8c 14-Sep-2012 Howard Hinnant <hhinnant@apple.com> Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send me a patch to CREDITS.TXT?

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@163862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
5fec82dc0db3623546038e4a86baa44f749e554f 30-Jul-2012 Howard Hinnant <hhinnant@apple.com> Implement [util.smartptr.shared.atomic]. This is the last unimplemented
section in libc++. This requires a recompiled dylib. Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.

The implementation is not lock free. After considerable thought, I know of no
way to make the implementation lock free. Ideas welcome along that front. But
changing the ABI of shared_ptr is not on the table at this point.

The mutex used to lock these function is encapsulated by std::__sp_mut. The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members. Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex. That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.

I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks. Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait). In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).

The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr. The constant 16 is a ball-park reasonable space/time
tradeoff.

std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function. I had thought we had already done this, but I was mistaken.

All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
46e9493c687004357f757d08335c3ec411a361fd 07-Jul-2012 Howard Hinnant <hhinnant@apple.com> Appy constexpr to <memory>. Picked up a few missing noexcepts as well.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
9b763e0945f966c11d7f6dc4f619231ae5644810 19-May-2012 Howard Hinnant <hhinnant@apple.com> Revert fix to http://llvm.org/bugs/show_bug.cgi?id=12867 for the reason now included in the code comment.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
762657693d76b4e142c192ab778de2f496fb68fc 18-May-2012 Howard Hinnant <hhinnant@apple.com> Protect __shared_weak_count::__get_deleter declaration with _LIBCPP_NO_RTTI. Fixes http://llvm.org/bugs/show_bug.cgi?id=12867

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
87073e4bfb7886a9af1fe0bfe07f33518a29d6c8 01-May-2012 Howard Hinnant <hhinnant@apple.com> Greatly scale back ambitions of emulating move semantics in C++03 mode. It was causing more problems than it solved. This fixes http://llvm.org/bugs/show_bug.cgi?id=12704.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@155918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
7786188d151aeb60404fd4dd2d1268725e3b9f25 21-Feb-2012 Howard Hinnant <hhinnant@apple.com> Modernize conversion to bool to the explicit bool conversion operator (library wide). This fixes http://llvm.org/bugs/show_bug.cgi?id=12058.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
3fadda314ad3b1fd0ba16db83476a9d5a7b58d78 21-Feb-2012 Howard Hinnant <hhinnant@apple.com> Modernize relational operators for shared_ptr and unique_ptr. This includes adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
b0bfd9bdd672bbce086bd1467645b54d4fc7f8ad 15-Feb-2012 Howard Hinnant <hhinnant@apple.com> Implement a few optimizations for vector push_back and insert. Fixes r10828365.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
a18778751c13fa832302e842356a1057e5ac3128 20-Jan-2012 Howard Hinnant <hhinnant@apple.com> Enable full functionality of shared_ptr<const void> by adding allocator<const void>. Credit to John Hurley for discovering this bug.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@148508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
571994088f4c0a4162be896037c642919b6cc82c 02-Jan-2012 Howard Hinnant <hhinnant@apple.com> 1. Fix make_shared<const T>. 2. Allow allocator<const T> as an extension. 3. Refactor work which fixed unique_ptr<const T[]>. 4. Remove no-longer-needed private declarations from unique_ptr. 5. Add constraints to some shared_ptr and weak_ptr constructors and assignment operators so that is_constructible/is_assignable give the correct answers for shared_ptr and weak_ptr. 6. Make defensive preparations in the shared_ptr free functions for the introduction of shared_ptr<T[]> in the future. 7. As an optimization, add move constructor and move assignment to weak_ptr.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@147437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8292d742700b1ed5b64aad40beef86ef39a6b202 29-Dec-2011 Howard Hinnant <hhinnant@apple.com> The exception recovery mechanism for the uninitialized_* algorithms did not work for iterators into discontiguous memory.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@147343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
6cc99fa3383819459c999075d34b55b841a8922a 19-Dec-2011 Howard Hinnant <hhinnant@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=11616

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
8e84350ebfc8199a9878c7727dedb9f9d19253fe 18-Dec-2011 Howard Hinnant <hhinnant@apple.com> Allow unique_ptr<T const []> to be constructed and assigned from a unique_ptr<T[]>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
0a63119a76fde68ef27f887b404c1b907f40c4fb 16-Dec-2011 Howard Hinnant <hhinnant@apple.com> Allow unique_ptr<T const []> to be constructed with a T* (in addition to a const T*)

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
d4cf215e0852a748a6881ba36f2b81eda7d40e85 11-Dec-2011 Howard Hinnant <hhinnant@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=11461. Credit Alberto Ganesh Barbati.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
c00f75dc7520e88225b0e71b7c48f3d2d9a13334 10-Dec-2011 Howard Hinnant <hhinnant@apple.com> Installation of CityHash by Craig Silverstein

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
40c13d31c580d904d0c400f6bab1addf1535cf69 05-Dec-2011 Howard Hinnant <hhinnant@apple.com> Starting using murmur2 when combining multiple size_t's into a single hash, and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
cf2654bae716cbcc70a45adfcb46c211121565d7 03-Dec-2011 Howard Hinnant <hhinnant@apple.com> Version #next on the hash functions for scalars. This builds on Dave's work, extends it to T*, and changes the way double and long double are handled (no longer convert to float on 32 bit). I also picked up a minor bug with uninitialized bits on the upper end of size_t when sizeof(size_t) > sizeof(T), e.g. in hash<float>. Most of the functionality has been put in one place: __scalar_hash in <memory>. Unfortunately I could not reuse __scalar_hash for hash<long double> on x86 because of the padding bits which need to be zeroed. I didn't want to add this zeroing step to the more general __scalar_hash when it isn't needed (in the absence of padding bits). I'm not ignoring the hash<string> issue (possibly changing that to a better hash). I just haven't gotten there yet.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
ec3773c2dadbeadfc5def927116c2ee9d9c53066 01-Dec-2011 Howard Hinnant <hhinnant@apple.com> Quash a whole bunch of warnings

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
9996844df0f22a68a1af6d30c611be1f1ebf1486 29-Nov-2011 Howard Hinnant <hhinnant@apple.com> 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
/external/libcxx/include/memory
66c6f9733b5fde00b3e07602cc8b5eef59c8f514 29-Nov-2011 Howard Hinnant <hhinnant@apple.com> Add protection from min/max macros

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
08e17472e4d5434b668dd4c63e3fa5f4b45337b9 17-Oct-2011 Howard Hinnant <hhinnant@apple.com> Windows support by Ruben Van Boxem.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
f8800b12c5bbd2a1e933fb4cfbc903bd4e7cd917 01-Oct-2011 Howard Hinnant <hhinnant@apple.com> Fix <rdar://problem/10217868>.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
23369ee812cd529293ceb689358a13c579c03c5e 29-Jul-2011 Howard Hinnant <hhinnant@apple.com> Configure to get along with 2.9 clang

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@136526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
464aa5cad3a94a3bc599e8999a270694873f48a0 18-Jul-2011 Howard Hinnant <hhinnant@apple.com> http://llvm.org/bugs/show_bug.cgi?id=10390

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
61aa6013c3377203aff484cf3300ac26511c26ac 01-Jul-2011 Howard Hinnant <hhinnant@apple.com> Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
0949eedbd621bc1611266fb180d9a356ee1eaf9f 30-Jun-2011 Howard Hinnant <hhinnant@apple.com> _STD -> _VSTD to avoid macro clash on windows

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
35d2fcfc8e2462bccf0b078c457c052138dbc4ed 23-Jun-2011 Douglas Gregor <dgregor@apple.com> Teach libc++ about the addressof() overloads it needs to work with
Objective-C Automatic Reference Counting, where Objective-C object
pointers can have several different qualifiers (__strong, __weak,
__autoreleasing, __unsafe_unretained). These addressof() overloads are
only provided in ARC mode, and the __weak variant is conditionalized
on having weak-reference support in the ARC runtime.

For historical reasons, Clang provides these definitions itself, and
defines the macro _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF to note when
it as done so. The code belongs here, and this redundancy will be
eliminated in the future.

Addresses <rdar://problem/9658274>.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
2b1b2d40d71786272dfb2670cadc468c890e400c 14-Jun-2011 Howard Hinnant <hhinnant@apple.com> Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
18884f4e9f19f81e8772f4ce324e509e11928cdc 02-Jun-2011 Howard Hinnant <hhinnant@apple.com> Second try at getting noexcept on move and swap for deque. I changed std::alloctor to propagate_on_container_move_assignment so as to make deque<T> move assignment noexcept. What we really need is a compile-time switch that says an allocator always compares equal.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
1694d23e23d41c4037111d96324c0c16c744c09d 28-May-2011 Howard Hinnant <hhinnant@apple.com> noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
e003ce4899cb7d6e0752cfa43ea66d36a3c864d2 22-May-2011 Howard Hinnant <hhinnant@apple.com> __invokable and __invoke_of now check for incomplete types and issue a compile-time diagnostic if they are used with incomplete types for anything except a return type. Note that both arguments *and* parameters are checked for completeness.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
6b41c6047ba9016a4a183fd77522db941bc32392 11-May-2011 Howard Hinnant <hhinnant@apple.com> Corrected some bugs in both memory and the tests. Preparing for being able to turn on support for alias templates.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
2529d02b5da548f75d4c7d27c1a5c1c267a9b558 02-Feb-2011 Howard Hinnant <hhinnant@apple.com> Qualify calls to addressof with std::. Bug 9106

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
ac38bae75b0f08669e168762d45b41b9bab49085 11-Jan-2011 Howard Hinnant <hhinnant@apple.com> fix guard

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@123269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
626916fc255c40bc45e0f20ee69faf48f5094cac 10-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Add CMake build and fix major Linux blockers.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
1468b668aa964beb1220e9b36162b092fb54952b 19-Nov-2010 Howard Hinnant <hhinnant@apple.com> N3142. Many of these traits are just placeholders with medium quality emulation; waiting on compiler intrinsics to do it right.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
2f6a6273948e56d9d39843ba1074830049222e18 18-Nov-2010 Howard Hinnant <hhinnant@apple.com> LWG 1339

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
47761071be811e5815311294b71ad6ac9414963e 18-Nov-2010 Howard Hinnant <hhinnant@apple.com> LWG 1404

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
b64f8b07c104c6cc986570ac8ee0ed16a9f23976 16-Nov-2010 Howard Hinnant <hhinnant@apple.com> license change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
28dbbe0596878c12e13507aad6b40d33e5a8fa20 16-Nov-2010 Howard Hinnant <hhinnant@apple.com> Dave Zarzycki showed how the efficiency of shared_ptr could be significantly
increased. The following program is running 49% faster:

#include <iostream>
#include <memory>
#include <chrono>
#include <vector>
#include "chrono_io"

int main()
{
typedef std::chrono::high_resolution_clock Clock;
Clock::time_point t0 = Clock::now();
{
std::shared_ptr<int> p(new int (1));
std::vector<std::shared_ptr<int> > v(1000000, p);
v.insert(v.begin(), p);
v.insert(v.begin(), p);
v.insert(v.begin(), p);
v.insert(v.begin(), p);
}
Clock::time_point t1 = Clock::now();
std::cout << (t1-t0) << '\n';
}


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
726a76fb47b47a4999a981d66a8c5e44fcf8c57c 16-Nov-2010 Howard Hinnant <hhinnant@apple.com> I have reverted all contributions made by Jesse Towner in revision 110724

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
828948148d334656de3ad671cc34a2e8b1b63cb1 22-Sep-2010 Howard Hinnant <hhinnant@apple.com> visibility-decoration.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
36cdf027d21e4ca2ee2c4af33f530d7c49082168 10-Sep-2010 Howard Hinnant <hhinnant@apple.com> I am experimenting with putting visibility-default attributes on all struct/classes in libc++. This checkin decorates only basic_string and vector as an experiment, and for review by those in this audience that might know more about visibilty than I do. If I get no negative feedback on this procedure I will begin to decorate the entire library in this way.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
73d21a4f0774d3fadab98e690619a359cfb160a3 05-Sep-2010 Howard Hinnant <hhinnant@apple.com> Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
324bb03bb94f67ae7f9092810e4e4f6bd8bf506e 22-Aug-2010 Howard Hinnant <hhinnant@apple.com> Fixing whitespace problems

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
92172b891fabc4d92cc6fa32b1c70d7d926571fa 21-Aug-2010 Howard Hinnant <hhinnant@apple.com> US 108, N3109

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
e92c3d74cefe87767b620688ef083be8f976e62d 19-Aug-2010 Howard Hinnant <hhinnant@apple.com> US 107

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
d444470d6cd1cad554139c4ba7f3c4f3fe921a5d 11-Aug-2010 Howard Hinnant <hhinnant@apple.com> now works with -fno-exceptions and -fno-rtti

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
60a0a8ef24f0f3a7d351efda444bf62025c78b47 10-Aug-2010 Howard Hinnant <hhinnant@apple.com> patch by Jesse Towner, and bug fix by Sebastian Redl

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
21aefc3a6135c6447b8b43ac3f2349bf568e2900 03-Jun-2010 Howard Hinnant <hhinnant@apple.com> [util.smartptr.hash]

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@105393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
03aad81afdf77c64e50d0df3f1a8767ea24aa827 12-May-2010 Howard Hinnant <hhinnant@apple.com> [rand.dist.bern.bin]. The evaluation function for this binomial distribution is hopefully just a placeholder. It is using the simplest and slowest method for computing the distribution and needs to be upgraded.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
f5256e16dfc425c1d466f6308d4026d529ce9e0b 11-May-2010 Howard Hinnant <hhinnant@apple.com> Wiped out some non-ascii characters that snuck into the copyright.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory
bc8d3f97eb5c958007f2713238472e0c1c8fe02c 11-May-2010 Howard Hinnant <hhinnant@apple.com> libcxx initial import

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/include/memory