1. 7a44515 This commit establishes a new bucket_count policy in the unordered containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have. by Howard Hinnant · 12 years ago
  2. 518d150 mark operator new(std::nothrow) as noalias (aka __attribute__((malloc)) by Nuno Lopes · 12 years ago
  3. 2d62229 Fixed a bug regarding result_of reported by Sven Behne. The fix is C++11 only mainly because result_of is a variadic beast and working with variadics is just such a problem in C++03 mode. This should bring result_of up to full conformance with the C++11 spec. by Howard Hinnant · 12 years ago
  4. fe59276 Revert pair constructors back to using is_convertible instead of is_constructible. This should pull things into alignment with the final draft. Fixes http://llvm.org/bugs/show_bug.cgi?id=13063#add_comment. by Howard Hinnant · 12 years ago
  5. dbd9eac Fix dangling else clause. Bug found and fixed by Dimitry Andric. by Howard Hinnant · 12 years ago
  6. 6467aeb Fix the new _ALIGNAS_TYPE per instructions supplied by Eli Friedman. by Howard Hinnant · 12 years ago
  7. cbdd089 Protect use of alignas against older versions of clang by Howard Hinnant · 12 years ago
  8. 635ce1d The rules for emplace in map, multimap, unordered_map and unordered_multimap changed a while back and I'm just now updating to these new rules. In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors. I made one extension: If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()). by Howard Hinnant · 12 years ago
  9. 3e3e5eb Fix memory corruption bug found and fixed by Andrew C. Morrow. by Howard Hinnant · 12 years ago
  10. 9b763e0 Revert fix to http://llvm.org/bugs/show_bug.cgi?id=12867 for the reason now included in the code comment. by Howard Hinnant · 12 years ago
  11. 0855dde Revert my _LIBCPP_INLINE_VISIBILITY changes, r157097 and r157107 by Douglas Gregor · 12 years ago
  12. f20f0d3 valarray resize should not be _LIBCPP_INLINE_VISIBILITY by Douglas Gregor · 12 years ago
  13. e9e4b85 Move _LIBCPP_VISIBLE_INLINE from the out-of-line definitions of member by Douglas Gregor · 12 years ago
  14. 7626576 Protect __shared_weak_count::__get_deleter declaration with _LIBCPP_NO_RTTI. Fixes http://llvm.org/bugs/show_bug.cgi?id=12867 by Howard Hinnant · 12 years ago
  15. ffa7fbe Fix several bugs in find/count specialized for bits. by Howard Hinnant · 12 years ago
  16. b3cf4b5 Add friends __count_bool_true and __count_bool_false to __bit_iterator. by Howard Hinnant · 12 years ago
  17. f867f63 SFINAE __bit_iterator such that it will only get instantiated with a container that has the nested type __storage_type. This prevents accidental instantiation such as in http://llvm.org/bugs/show_bug.cgi?id=12755. This fixes http://llvm.org/bugs/show_bug.cgi?id=12755. by Howard Hinnant · 13 years ago
  18. d2da6d2 Constrain __bind functor constructor such that it won't accidentally get used as a copy constructor from a non-const lvalue. Fixes <rdar://problem/11359080>. by Howard Hinnant · 13 years ago
  19. f07a529 Change std::abs from a template function to three overloads for float, double and long double. by Howard Hinnant · 13 years ago
  20. 87073e4 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. by Howard Hinnant · 13 years ago
  21. 300c67a Apply noexcept and constexpr to <atomic>. by Howard Hinnant · 13 years ago
  22. 6186c7f Switch libc++ from __atomic_* builtins to __c11_atomic_* builtins. by Richard Smith · 13 years ago
  23. b229209 Now that clang supports doing the right thing with regard to atomic by David Chisnall · 13 years ago
  24. 0341c82 Fix use of __atomic_is_lock_free() intrinsic. by David Chisnall · 13 years ago
  25. 616e92d Put std::piecewise_construct_t back into the dylib for ABI stability. When clients are in C++11/constexpr mode this will be safely ignored because piecewise_construct is then declared with internal linkage. by Howard Hinnant · 13 years ago
  26. 2a5349b constexpr support for <utility>. Patch contributed by Jonathan Sauer. by Howard Hinnant · 13 years ago
  27. 8efd3da Update <random> with constexpr support. Patch contributed by Jonathan Sauer. by Howard Hinnant · 13 years ago
  28. 60cb7d2 Update <limits> with constexpr support. Patch contributed by Jonathan Sauer. by Howard Hinnant · 13 years ago
  29. 27b4fd3 This is an initial commit of constexpr support as proposed by Richard Smith. This by no means completes constexpr support. Indeed, it hardly scratches the surface. All it does is lay the foundation in <__config> and changes those few places in the library that are already using that foundation. by Howard Hinnant · 13 years ago
  30. dc1345f I believe tuple is still under development in the standard. Daniel Krugler is/will be making convincing arguments that a modified form of LWG 2051 (currently NAD Future) is easily acheivable and desirable. He has demonstrated that a tuple<T...> where all of the T are implicitly convertible from U... should have a tuple constructor that is also implicit, instead of explicit. This would support the use cases in LWG 2051 while not undermining T... with explicit conversions from U.... This check-in is an experimental implementation of Daniel's work. I believe this work to be mature enough to warrant inclusion into libc++. If anyone sees real-world problems that this check in causes, please let me know and I will revert it, and provide the feedback to the LWG. by Howard Hinnant · 13 years ago
  31. 9aa4e11 It appears that the standard accidentally removed the default constructor for error_category. I'm putting it back in. This fixes http://llvm.org/bugs/show_bug.cgi?id=12321. by Howard Hinnant · 13 years ago
  32. f2533a8 Make sure [at_]quick_exit is in std:: by David Chisnall · 13 years ago
  33. 558ae17 Fix moneypunct_byname algorithm to more accurately represent C locales in C++. by Jeffrey Yasskin · 13 years ago
  34. 05b57d5 Change some smart_ptr == 0 to smart_ptr == nullptr. Fixes http://llvm.org/bugs/show_bug.cgi?id=12185. by Howard Hinnant · 13 years ago
  35. b56a4ad Define _WCHAR_T in solaris/wchar.h. This fixes a bug where Solaris 10 headers by David Chisnall · 13 years ago
  36. b6e7c30 Fix MSVC / Sun #ifdef ordering. Remove another #if-nothing-#endif. by David Chisnall · 13 years ago
  37. 26cba27 Remove a spurious #ifdef / #endif pair with nothing between them. by David Chisnall · 13 years ago
  38. ea27419 Add support files required for building on Solaris. by David Chisnall · 13 years ago
  39. 997e454 Solaris port. Currently sees around 200 test failures, mostly related to by David Chisnall · 13 years ago
  40. 8fa14e9 Don't define __locale_raii if we are not going to be using it. by David Chisnall · 13 years ago
  41. 4a13b2d Reduce the number of move constructions when constructing a std::function. This fixes http://llvm.org/bugs/show_bug.cgi?id=12105. by Howard Hinnant · 13 years ago
  42. 0438ea2 vector::emplace_back was mistakenly requiring move assignable. Fixed that and did a little drive-by optimization at the same time. This fixes http://llvm.org/bugs/show_bug.cgi?id=12085. by Howard Hinnant · 13 years ago
  43. 4300839 Hook up to the new clang __is_trivially_constructible and __is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038. by Howard Hinnant · 13 years ago
  44. 7786188 Modernize conversion to bool to the explicit bool conversion operator (library wide). This fixes http://llvm.org/bugs/show_bug.cgi?id=12058. by Howard Hinnant · 13 years ago
  45. 3fadda3 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. by Howard Hinnant · 13 years ago
  46. d41b60b Add missing newlines at EOF. by Bob Wilson · 13 years ago
  47. 3508b38 Give the emulated nullptr_t a default constructor. by Howard Hinnant · 13 years ago
  48. 1e9f55f Use __is_polymorphic if available. This fixes http://llvm.org/bugs/show_bug.cgi?id=11983 . Patch contributed by Jonathan Sauer. by Howard Hinnant · 13 years ago
  49. 2848444 tuple was accidentally lacking a valid copy assignment operator. It went undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921 by Howard Hinnant · 13 years ago
  50. b04ad41 Do not parse sign if a sign is not the next legal character when parsing floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871 by Howard Hinnant · 13 years ago
  51. d7a2ad6 Another stab at fixing http://llvm.org/bugs/show_bug.cgi?id=12007. I earlier missed that there are two common_type definitions and corrected only one of them. by Howard Hinnant · 13 years ago
  52. e5285fd Remove reference from common_type definition. It looks like a recent clang decltype implementation got fixed/improved and exposed this. Fixes http://llvm.org/bugs/show_bug.cgi?id=12007. by Howard Hinnant · 13 years ago
  53. b0bfd9b Implement a few optimizations for vector push_back and insert. Fixes r10828365. by Howard Hinnant · 13 years ago
  54. 5f3f35f Provide a move(const T&) overload for C++03 mode to enable moving from rvalues. This is to support proxy references. Fixes r10858112. by Howard Hinnant · 13 years ago
  55. a187787 Enable full functionality of shared_ptr<const void> by adding allocator<const void>. Credit to John Hurley for discovering this bug. by Howard Hinnant · 13 years ago
  56. e1a7b04 Fix http://llvm.org/bugs/show_bug.cgi?id=11752 by Howard Hinnant · 13 years ago
  57. ae8b16e Fix http://llvm.org/bugs/show_bug.cgi?id=11734 by Howard Hinnant · 13 years ago
  58. 5719940 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. by Howard Hinnant · 13 years ago
  59. 8292d74 The exception recovery mechanism for the uninitialized_* algorithms did not work for iterators into discontiguous memory. by Howard Hinnant · 13 years ago
  60. 6cc99fa Fix http://llvm.org/bugs/show_bug.cgi?id=11616 by Howard Hinnant · 13 years ago
  61. 83b2c84 Some fixes to <atomic> operations to explicitly use atomic types and operations. by David Chisnall · 13 years ago
  62. 8e84350 Allow unique_ptr<T const []> to be constructed and assigned from a unique_ptr<T[]> by Howard Hinnant · 13 years ago
  63. 0a63119 Allow unique_ptr<T const []> to be constructed with a T* (in addition to a const T*) by Howard Hinnant · 13 years ago
  64. f8880d0 As an extension, support incomplete types in the unordered containers to match what we already do in the associative containers. by Howard Hinnant · 13 years ago
  65. d4cf215 Fix http://llvm.org/bugs/show_bug.cgi?id=11461. Credit Alberto Ganesh Barbati. by Howard Hinnant · 13 years ago
  66. c00f75d Installation of CityHash by Craig Silverstein by Howard Hinnant · 13 years ago
  67. 40c13d3 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. by Howard Hinnant · 13 years ago
  68. cf2654b 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. by Howard Hinnant · 13 years ago
  69. 2891675 I had picked up the wrong version of DaveZ's hash patches. Corrected here. by Howard Hinnant · 13 years ago
  70. 62453ea Fixes to hash for long long, unsigned long long, float, double and long double. Credit Dave Zarzycki by Howard Hinnant · 13 years ago
  71. e814a90 Fix http://llvm.org/bugs/show_bug.cgi?id=11459. Patch supplied by Alberto Ganesh Barbati. by Howard Hinnant · 13 years ago
  72. f6d875f Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto Ganesh Barbati by Howard Hinnant · 13 years ago
  73. 438377c Jean-Daniel: __builtin_popcountll support for Windows by Howard Hinnant · 13 years ago
  74. ec3773c Quash a whole bunch of warnings by Howard Hinnant · 13 years ago
  75. 9996844 Further macro protection by replacing _[A-Z] with _[A-Z]p by Howard Hinnant · 13 years ago
  76. 66c6f97 Add protection from min/max macros by Howard Hinnant · 13 years ago
  77. 34869ad Remove redundant iterator assignment detected by Marshall Clow by Howard Hinnant · 13 years ago
  78. 91a8272 On FreeBSD, define a macro that causes the unimplemented C99 math.h functions to be declared. This prevents <cmath> users from being broken, unless they actually use the C++ wrappers that call the missing functions. by David Chisnall · 13 years ago
  79. ce6884c Fix ratio arithmetic with zero by Howard Hinnant · 13 years ago
  80. 9f8884e Windows port work by Ruben Van Boxem by Howard Hinnant · 13 years ago
  81. 8faa95f Fixed bug in __independent_bits_engine found by Nick (from stackoverflow) by Howard Hinnant · 13 years ago
  82. 78b6828 More windows port work by Ruben Van Boxem by Howard Hinnant · 13 years ago
  83. f46fc93 Windows port work by Ruben Van Boxem by Howard Hinnant · 13 years ago
  84. 8db4aca de-tabbify by Howard Hinnant · 13 years ago
  85. 08e1747 Windows support by Ruben Van Boxem. by Howard Hinnant · 13 years ago
  86. 2baccd8 Fix http://llvm.org/bugs/show_bug.cgi?id=11113 by Howard Hinnant · 13 years ago
  87. 1162445 Starting on musl port by Arvid Picciani by Howard Hinnant · 13 years ago
  88. b97de44 Fix <rdar://problem/10256836> getline of an empty string mistakenly causes failure by Howard Hinnant · 13 years ago
  89. c6fe8ca Fix <rdar://problem/10255403> match_results::begin() is off by one by Howard Hinnant · 13 years ago
  90. 15e48f9 Fix <rdar://problem/10226704> by Howard Hinnant · 13 years ago
  91. f8800b1 Fix <rdar://problem/10217868>. by Howard Hinnant · 13 years ago
  92. 14fa9f9 Windows port work by Ruben Van Boxem by Howard Hinnant · 13 years ago
  93. 3c466fc Windows patch work by Ruben Van Boxem by Howard Hinnant · 13 years ago
  94. 866569b Attempted locale refactoring. _LIBCPP_LOCALE__L_EXTENSIONS now should be defined if one has all of the xxx_l() functions. I've defined this for apple, freebsd and win32. _LIBCPP_HAS_DEFAULTRUNELOCALE should be defined if there is a _DefaultRuneLocale. I've defined this for apple and freebsd. The block of code we're trying to migrate away from is now under #ifdef __linux__. I've tested only on OS X. I hope I haven't broken things too badly elsewhere. Please let me know. by Howard Hinnant · 13 years ago
  95. efbe406 Work on Windows port by Ruben Van Boxem by Howard Hinnant · 13 years ago
  96. 2ea1ca9 Attempt to enable locale simplification. On which platforms can we now #define _LIBCPP_STABLE_APPLE_ABI? by Howard Hinnant · 13 years ago
  97. 1c3ec6d Another installment on debug mode. This addresses list. However this should be considered a temporary state. The API of the debug database and how vector and list use it, is unsatisfactory at the moment. It is both inefficient and overly verbose. I wanted to get this functionality checked in though. In the next day or so I'll refactor what is there in an attempt to streamline things. by Howard Hinnant · 13 years ago
  98. 6cd05ee Work on Windows port by Ruben Van Boxem by Howard Hinnant · 13 years ago
  99. 92a0700 Partial Windows port by Ruben Van Boxem by Howard Hinnant · 13 years ago
  100. c512df1 Fixes for FreeBSD, including some fairly obvious copy-and-paste errors. by David Chisnall · 13 years ago