summaryrefslogtreecommitdiffstats
path: root/libcxx/include/memory
Commit message (Collapse)AuthorAgeFilesLines
...
* Starting using murmur2 when combining multiple size_t's into a single hash, ↵Howard Hinnant2011-12-051-3/+92
| | | | | | 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. llvm-svn: 145795
* Version #next on the hash functions for scalars. This builds on Dave's ↵Howard Hinnant2011-12-031-6/+104
| | | | | | 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. llvm-svn: 145778
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-3/+3
| | | | llvm-svn: 145624
* Further macro protection by replacing _[A-Z] with _[A-Z]pHoward Hinnant2011-11-291-22/+22
| | | | llvm-svn: 145410
* Add protection from min/max macrosHoward Hinnant2011-11-291-0/+2
| | | | llvm-svn: 145407
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* Fix <rdar://problem/10217868>.Howard Hinnant2011-10-011-2/+0
| | | | llvm-svn: 140907
* Configure to get along with 2.9 clangHoward Hinnant2011-07-291-1/+1
| | | | llvm-svn: 136526
* http://llvm.org/bugs/show_bug.cgi?id=10390Howard Hinnant2011-07-181-0/+6
| | | | llvm-svn: 135393
* Correct for new rules regarding implicitly deleted special members. ↵Howard Hinnant2011-07-011-4/+169
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=10191 llvm-svn: 134248
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-67/+67
| | | | llvm-svn: 134190
* Teach libc++ about the addressof() overloads it needs to work withDouglas Gregor2011-06-221-0/+40
| | | | | | | | | | | | | | | | | 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>. llvm-svn: 133656
* Provide names for template and function parameters in forward declarations. ↵Howard Hinnant2011-06-141-3/+3
| | | | | | The purpose is to aid automated documentation tools. llvm-svn: 133008
* Second try at getting noexcept on move and swap for deque. I changed ↵Howard Hinnant2011-06-021-0/+2
| | | | | | 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. llvm-svn: 132490
* noexcept for <memory>. I've added a few extension noexcept to: ↵Howard Hinnant2011-05-281-288/+414
| | | | | | 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| llvm-svn: 132261
* __invokable and __invoke_of now check for incomplete types and issue a ↵Howard Hinnant2011-05-221-4/+4
| | | | | | 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. llvm-svn: 131818
* Corrected some bugs in both memory and the tests. Preparing for being able ↵Howard Hinnant2011-05-111-3/+3
| | | | | | to turn on support for alias templates. llvm-svn: 131199
* Qualify calls to addressof with std::. Bug 9106Howard Hinnant2011-02-021-2/+2
| | | | llvm-svn: 124726
* fix guardHoward Hinnant2011-01-111-2/+2
| | | | llvm-svn: 123269
* Add CMake build and fix major Linux blockers.Michael J. Spencer2010-12-101-2/+4
| | | | llvm-svn: 121510
* N3142. Many of these traits are just placeholders with medium quality ↵Howard Hinnant2010-11-191-3/+3
| | | | | | emulation; waiting on compiler intrinsics to do it right. llvm-svn: 119854
* LWG 1339Howard Hinnant2010-11-181-2/+4
| | | | llvm-svn: 119699
* LWG 1404Howard Hinnant2010-11-181-9/+24
| | | | llvm-svn: 119609
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Dave Zarzycki showed how the efficiency of shared_ptr could be significantlyHoward Hinnant2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'; } llvm-svn: 119388
* I have reverted all contributions made by Jesse Towner in revision 110724Howard Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119383
* visibility-decoration.Howard Hinnant2010-09-221-31/+104
| | | | llvm-svn: 114551
* I am experimenting with putting visibility-default attributes on all ↵Howard Hinnant2010-09-101-1/+1
| | | | | | 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. llvm-svn: 113590
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-041-50/+50
| | | | | | 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. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-221-128/+124
| | | | llvm-svn: 111750
* US 108, N3109Howard Hinnant2010-08-211-17/+2
| | | | llvm-svn: 111747
* US 107Howard Hinnant2010-08-191-417/+326
| | | | llvm-svn: 111538
* now works with -fno-exceptions and -fno-rttiHoward Hinnant2010-08-111-0/+14
| | | | llvm-svn: 110828
* patch by Jesse Towner, and bug fix by Sebastian RedlHoward Hinnant2010-08-101-1/+1
| | | | llvm-svn: 110724
* [util.smartptr.hash]Howard Hinnant2010-06-031-0/+36
| | | | llvm-svn: 105393
* [rand.dist.bern.bin]. The evaluation function for this binomial ↵Howard Hinnant2010-05-111-2/+0
| | | | | | distribution is hopefully just a placeholder. It is using the simplest and slowest method for computing the distribution and needs to be upgraded. llvm-svn: 103524
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+3824
llvm-svn: 103490
OpenPOWER on IntegriCloud