Marshall Clow
471f3c67db
Fix a couple of -Wabsolute-value warnings in the libc++ tests
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203126 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 16:27:17 +00:00
Peter Collingbourne
9d3d032c7d
Do not derive __gnu_cxx::hash<T> from std::hash<T>.
...
Instead, define explicit specializations for the basic types listed in
the SGI documentation. This solves two problems:
1) Helps avoid silent ODR violations caused by the absence of a
user-supplied __gnu_cxx::hash specialization in cases where a std::hash
specialization exists (e.g. for std::string).
2) __gnu_cxx::hash semantics are slightly different to those of
std::hash (for example, the former may dereference a pointer argument)
so it is inappropriate for __gnu_cxx::hash to receive std::hash
specializations by default.
Differential Revision: http://llvm-reviews.chandlerc.com/D2747
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203070 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 04:11:10 +00:00
Marshall Clow
48c74700ec
Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unordered containers; implement it for set/multiset/map/multimap. Add tests for all the containers. Two drive-by fixes as well: add a missing explicit in <deque>, and remove a tab that snuck into a container test. This issue is also LLVM bug 15724, and resolves it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202994 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 19:06:20 +00:00
Marshall Clow
24b29a02f1
Mark is_final as a C++14 feature.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202991 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 17:58:48 +00:00
Marshall Clow
0d6dcb5569
Remove definition of std::fmaf from libc++. Fixes bug #18910 . This function should come from the C standard library. As a drive-by fix, update the tests to remove a warning from -Wabsolute-value
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202990 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 17:09:51 +00:00
Marshall Clow
ebd6c2b81d
Implement LWG #2212 : std::is_final. This requires compiler support, which modern versions of clang provide. Also mark LWG #2230 as complete - no code changes needed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 03:39:25 +00:00
Marshall Clow
23ef151614
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
2014-03-05 03:12:04 +00:00
Marshall Clow
8d4ce30c79
LWG Issue #2271 : regex_traits::lookup_classname specification unclear. libc++ already does the right thing; just update the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202904 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 22:44:34 +00:00
Marshall Clow
cbb9305c26
LWG issue #2252 : Add more tests for exception safety. No changes needed in the library
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202885 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 20:31:21 +00:00
Marshall Clow
a6057a525a
Fix issue number error; 2141 --> 2291 and mark it as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202884 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 20:29:09 +00:00
Marshall Clow
5ba85af029
Add a SG1 paper and some SG1 issues that affect the library to the task list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202881 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 19:40:36 +00:00
Marshall Clow
ab9da1a78f
Apply David Majnemer's patch updating the links to the papers from Chicago and Issaquah.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202878 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 19:22:53 +00:00
Marshall Clow
8f20e52a2b
Mark issues #2240 (wording only) and #2268 (revision 202876) as complete.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202877 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 19:18:36 +00:00
Marshall Clow
a93b5e27a8
Implement LWG #2268 : Setting a default argument in the declaration of a member function assign of std::basic_string.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202876 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 19:17:19 +00:00
Peter Collingbourne
be8a99ad0f
[libc++] Const qualify __gnu_cxx::hash_map<>::const_iterator::pointer type.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D2811
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202749 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:50:01 +00:00
Marshall Clow
53c0e72d5c
Implement LWG 2324: Insert iterator constructors should use addressof(). Add two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202741 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:20:40 +00:00
Marshall Clow
0c60b0a686
Remove a stray tab that snuck into a test. No functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202739 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:16:40 +00:00
Marshall Clow
50fe0c7d61
Implement LWG Paper n3887: Consistent Metafunction Aliases. This adds std::tuple_element_t<> as an alias for tuple_element<>::type. Clean up the synopsis for tuple_element in <utility> as well.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202673 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 06:18:11 +00:00
Marshall Clow
3fef95b10d
Per N3924, mark random_shuffle as deprecated in the synopsis for <algorithm>. Since we don't actually do anything when a call is deprecated, there is no functionality change. Maybe someday, we'll decide to warn when using a deprecated function.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202672 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 06:14:19 +00:00
Marshall Clow
ff137e9145
Implement LWG Issue #2285 - make_reverse_iterator. Also mark issues #1450 and #2205 as complete; they are just wording changes in the standard. Mark issues #2359 , #2320 and #2322 as complete - libc++ implements them already.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202671 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 01:24:04 +00:00
Marshall Clow
37a9ca6fb2
More LWG issues. Mark #2182 , #2323 and #2213 as complete. Add a test for #2339 , and mark that as complete. No actual changes to the libc++ code; all of these were already in place.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202407 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27 16:13:36 +00:00
Marshall Clow
02ca8af10b
LWG issue #2188 : Reverse iterator does not fully support targets that overload operator&. Also mark #2272 and #2299 as complete; libc++ already implements them.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202339 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27 02:11:50 +00:00
Bob Wilson
ec7009afe8
Don't install CMakeLists.txt along with the headers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202280 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 17:14:09 +00:00
Marshall Clow
103af3478e
Implement LWG issue 2306: match_results::reference should be value_type&, not const value_type&. This is a general move by the LWG to have the reference type of read-only containers be a non-const reference; however, there are no methods that return a non-const reference to a match_result entry, so there's no worries about getting a non-const reference to a constant object.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202214 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 01:56:31 +00:00
Marshall Clow
d3ac046ba5
Mark LWG issue 2299 as complete. No code changes; libc++ already implements this.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202203 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 23:11:19 +00:00
Marshall Clow
e75439f54b
Mark LWG Issue 2257 as complete.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202162 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 16:35:39 +00:00
Marshall Clow
cc4759288b
Mark LWG Issues 2278 and 2313 as complete. No code changes needed; libc++ already implemented both of these.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202161 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 16:25:55 +00:00
Marshall Clow
8e554d93da
Implement LWG issue 2301: Mark std::tie as constexpr
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202158 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 16:11:46 +00:00
Marshall Clow
4ffb67eca5
Fix historical #ifdef. Use __cplusplus instead of __GXX_EXPERIMENTAL_CXX0X__ when compiling with clang. No functionality change. Noteto self: It is important to run the regression tests on the copy of the code that you've changed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201938 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-22 15:13:48 +00:00
Juergen Ributzka
db9d0da3b4
Revert "Fix historical #ifdef. Use __cplusplus instead of __GXX_EXPERIMENTAL_CXX0X__ when compiling with clang. No functionality change."
...
This reverts commit r201864, because it breaks our build bots.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201892 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21 21:06:36 +00:00
Marshall Clow
c4a47e14b9
Fix historical #ifdef. Use __cplusplus instead of __GXX_EXPERIMENTAL_CXX0X__ when compiling with clang. No functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201864 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21 18:07:52 +00:00
Yaron Keren
0648cc5316
Solve the errors
...
Error 1 error C2681: 'add_rvalue_reference<_Tp*>::type' : invalid expression
type for dynamic_cast c:\libcxx\include\type_traits
This is one more step getting libcxx compile under Visual C++. The patch is
#if defined(_LIBCPP_MSVC) so will affect only this build.
When libcxx can be compiled, it will probably require the current version or
maybe even the next Update of Visual C++ 2013.
Patch by G M!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201844 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21 10:00:31 +00:00
Chandler Carruth
f84f6118b3
Teach libc++ to use the compiler-provided C-compatible ::max_align_t
...
rather than its own type for std::max_align_t. This is particularly
relevant as the types may not be ABI compatible despite users expecting
them to be.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201843 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21 08:37:30 +00:00
Marshall Clow
e0f8672e7a
Implement LWG Issues #2329 and #2332 - disallow iterators into temporary regexes and regexes into temporary strings
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201717 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 21:21:11 +00:00
Marshall Clow
d81d83f098
Mark issues 2280, 2258, 2304, 2317, 2350 and 2346 as completed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201704 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 17:55:46 +00:00
Marshall Clow
9dacb2f713
Implement LWG Issue: 2280. begin/end for arrays should be constexpr and noexcept, plus a drive-by fix for cbegin/cend suggested by Peter Sommerlad.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201703 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 17:53:30 +00:00
Marshall Clow
9d9463a355
Implement LWG2350: min, max, and minmax should be constexpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201697 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 16:51:35 +00:00
Marshall Clow
a2df82b98e
Implement LWG Issue 2346: integral_constant's member functions should be marked noexcept
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201534 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 22:18:51 +00:00
Marshall Clow
8eb5acc3c7
Remove tabs that crept in during an earlier refactoring. No functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201472 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 01:57:26 +00:00
Marshall Clow
b88d7cc71c
Mark issue 2293, 2241 and 2308 as complete
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201460 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 05:41:48 +00:00
Marshall Clow
224dec238c
First pass at the Issaquah issues list
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201459 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 05:10:39 +00:00
Marshall Clow
d2060f06b5
Add a test to make sure that vector supports incomplete types
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201349 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 17:56:12 +00:00
Yaron Keren
117cbb307b
This solves warning C4005: '_NOEXCEPT' : macro redefinition when compiling
...
with Visual C++ 2013 by making libcxx definition text-identical to yvals.h.
Persumably this definition is for older Visual C++ versions.
In such cases it will still be defined so no functionality change.
Other platforms should not be affected as this is inside
#elif defined(_LIBCPP_MSVC)
Patch by G M!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201328 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 14:02:28 +00:00
Marshall Clow
71e699dda5
Fix for PR17606 - result_of (and INVOKE) works incorrectly for member function pointers with ref qualifiers. Also a drive-by fix for common_type in C++03 mode. Thanks to Michel Morin for the bug report and the proposed fix.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201101 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 17:40:28 +00:00
Marshall Clow
ebfc50ee89
Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201021 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-08 04:03:14 +00:00
Joerg Sonnenberger
cf7278afd7
Avoid signed vs unsigned compare warnings. From Dimitry Andric.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200993 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-07 21:14:29 +00:00
Peter Collingbourne
a3dc8f3b8b
Support forward_list<Incomplete Type>. Patch by Zhihao Yuan!
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200814 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 01:44:17 +00:00
Howard Hinnant
08356fbee7
Albert Wong: Fix thread.thread.id/lt.pass.cpp to not assume thread::id() produces a minimal value. This enables this test to pass on andriod arm.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200793 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04 19:51:48 +00:00
Marshall Clow
13fbe9d5e3
Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200724 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03 23:26:56 +00:00
Logan Chien
e1678a18d9
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
2014-01-31 09:30:46 +00:00