Commit Graph

1111 Commits

Author SHA1 Message Date
Marshall Clow
e75599557a remove CWG papers from list; add link to clang status page
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 16:30:37 +00:00
Marshall Clow
9b86fc17a0 Added CWG and SG1 papers to libc++ status page
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 16:12:34 +00:00
Marshall Clow
68b4025292 Mark LWG Issue #2110 and #2113 as completed - they were already done
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188378 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 15:28:40 +00:00
Marshall Clow
2df3700879 Add a deleted assignment operator for basic_ostream; LWG Issue #2067
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188375 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 15:15:28 +00:00
Marshall Clow
198a2a59ee Implement LWG Issue #2187 (emplace_back and emplace for vector<bool>)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188333 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 23:54:12 +00:00
Marshall Clow
bf6eda0b1e Eradicate tabs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188322 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 22:22:40 +00:00
Marshall Clow
5da3087628 Update for N3657 and issue 2010
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188321 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 22:20:01 +00:00
Marshall Clow
5cfc6ab2b8 Second half (map/multimap) of N3657
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188320 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 22:18:47 +00:00
Marshall Clow
23d1ccc3dc Updated issues 2039, 2044, 2197, 2225, and 2231
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188294 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 17:02:42 +00:00
Marshall Clow
6ef840818d Updated Issue 2187
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188286 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 16:23:22 +00:00
Marshall Clow
0931015f01 Removed 'Ready' issues from Bristol
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 16:07:51 +00:00
Marshall Clow
83e40c4a80 Updated issues 2009 and 2074
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188283 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 16:01:28 +00:00
Marshall Clow
8634fc5494 Added more tests for numeric conversion error handing; Refs LWG issue 2009
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 15:52:51 +00:00
Marshall Clow
6b229e1ad1 Fix template formatting. No, really
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188277 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 15:13:42 +00:00
Marshall Clow
deb471c3c6 escape some template specs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188276 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 15:07:02 +00:00
Marshall Clow
437cdcf813 Fix case mismatch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188275 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 14:59:44 +00:00
Marshall Clow
5d4807742f Create a C++14 status page
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 14:58:39 +00:00
Marshall Clow
7a4e374280 More support for N3657; tests for is_transparent
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188242 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 01:12:41 +00:00
Marshall Clow
4a0a98166c First half of support for N3657; heterogenous lookups for set/multiset
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188241 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 01:11:06 +00:00
Howard Hinnant
0f678bd69e 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
2013-08-12 18:38:34 +00:00
Howard Hinnant
80e19ac90f Add a check for arrays of unknown bounds to is_destructible. This fixes http://llvm.org/bugs/show_bug.cgi?id=16839
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188080 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 16:53:45 +00:00
Howard Hinnant
5ea5d31f6d Partial implementation of N3665. This paper was not voted into the C++1y draft. However I was looking at it and with some experimentation realized that I could partially implement it, and at the same time offer a performance optimization to cout. I simply added an xsputn override to the cout filebuf. The override does nothing special at all if there is a non-trivial codecvt installed. However if the codecvt returns true for always_noconv(), then this function can dump an entire string to fwrite, instead of doing it a character at a time under overflow(). This just makes sense. I stopped short of a full implementation of N3665 because in order to do so, xsputn would have to allocate a buffer when always_noconv() returned false, and I don't want to go to that expense.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 16:25:43 +00:00
Daniel Dunbar
bd7b48a628 [tests] Update to use lit_config and lit package, as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 14:44:11 +00:00
Marshall Clow
051c848e88 N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188019 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:52:50 +00:00
Howard Hinnant
a4e87abbb9 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
2013-08-08 18:38:55 +00:00
Arnold Schwaighofer
a709c823f7 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
2013-08-08 03:06:24 +00:00
Howard Hinnant
70730d8f1c Update CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187936 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:29:10 +00:00
Howard Hinnant
d8bfe7ba56 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
2013-08-07 23:02:42 +00:00
Marshall Clow
193ef03eb5 N3644 support for <unordered_set> and <unordered_map>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 21:30:44 +00:00
Marshall Clow
b92ee614f2 N3644 support for vector<bool>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187911 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:53:44 +00:00
Marshall Clow
52ad482edc N3644 support for vector<bool>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187910 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:53:38 +00:00
Marshall Clow
0f164c9d75 N3644 support for <string> and <vector>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187909 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:48:48 +00:00
Howard Hinnant
36ba399a33 Correct logic bug in find optimization for vector<bool>. This fixes http://llvm.org/bugs/show_bug.cgi?id=16816
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:42:16 +00:00
Howard Hinnant
ab61b2c9f1 War on tabs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187906 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 19:39:48 +00:00
Howard Hinnant
f68b46f0c9 Rename time.duration.literals step 3
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 19:39:11 +00:00
Howard Hinnant
32c0969361 Rename time.duration.literals step 2
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 19:36:50 +00:00
Howard Hinnant
c29e1b949c Rename time.duration.literals step 1
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187903 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 19:35:46 +00:00
Marshall Clow
f9c29e160c Implement tests for NULL iterators for <array> re: N3644
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187809 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 17:17:13 +00:00
Marshall Clow
5a11f94583 Implement NULL iterators for <forward_list> and <deque> re: N3644
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 16:14:36 +00:00
Marshall Clow
65d2e6a392 Implement NULL iterators for <list> re: N3644
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 21:23:28 +00:00
Howard Hinnant
824c19963e debug mode for unordered_map. Also picked up a missing check and test in unordered_multimap. This wraps up debug mode for the unordered containers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187659 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 17:50:49 +00:00
Howard Hinnant
8b00e6c960 Ok, 3 major changes for debug mode in one commit:
1.  I had been detecting and trapping iterator == and \!= among iterators
    in different containers as an error.  But the trapping itself is actually
    an error.
    
    Consider:
    
    #include <iostream>
    #include <vector>
    #include <algorithm>

    template <class C>
    void
    display(const C& c)
    {
        std::cout << "{";
        bool first = true;
        for (const auto& x : c)
        {
            if (\!first)
                std::cout << ", ";
            first = false;
            std::cout << x;
        }
        std::cout << "}\n";
    }

    int
    main()
    {
        typedef std::vector<int> V;
        V v1 = {1, 3, 5};
        V v2 = {2, 4, 6};
        display(v1);
        display(v2);
        V::iterator i = std::find(v1.begin(), v1.end(), 1);
        V::iterator j = std::find(v2.begin(), v2.end(), 2);
        if (*i == *j)
            i = j;    // perfectly legal
        // ...
        if (i \!= j)   // the only way to check
            v2.push_back(*i);
        display(v1);
        display(v2);
    }

    It is legal to assign an iterator from one container to another of the
    same type.  This is required to work.  One might want to test whether or
    not such an assignment had been made.  The way one performs such a check
    is using the iterator's ==, \!= operator.  This is a logical and necessary
    function and does not constitute an error.

2.  I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
    This caused a problem in several of the libc++ tests.
    Fixed.

3.  There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
    std::basic_string is inoperable.  std::basic_string uses __wrap_iterator
    to implement its iterators.  __wrap_iterator has been rigged up in debug
    mode to support vector.  But string hasn't been rigged up yet.  This means
    that one gets false positives when using std::string in debug mode.  I've
    upped std::string's priority in www/debug_mode.html.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 00:26:35 +00:00
Howard Hinnant
e9df0a5c6c Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.

This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:

- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
  _MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
   when _WIN32 is defined.

This leaves _WIN32 for code using the Windows API.

This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.

Nico, please prepare a patch for CREDITS.TXT, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Howard Hinnant
56dcf0b809 Taking another swing at correctly optimizing fill_n.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187587 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 17:29:28 +00:00
Howard Hinnant
eb34122153 Constrain fill_n -> memset operations to include implicit convertibility to unsigned char. This fixes http://llvm.org/bugs/show_bug.cgi?id=16764. Also a drive-by fix on a chrono test suite bug.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187552 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 00:41:55 +00:00
Marshall Clow
a61e6f8705 Implement constexpr (n3302) and fix operator *= and /=
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187529 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 21:02:34 +00:00
Marshall Clow
0777473911 Backwards!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187518 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:39:37 +00:00
Marshall Clow
832b304076 Implement n3469 - constexpr for chrono
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:32:19 +00:00
Howard Hinnant
f890d9bfaa Debug mode for unordered_multimap. Some mods were done for unordered_map as well to keep all the tests passing. However unordered_map is at the very least still missing tests, if not functionality (if it isn't tested, it probably isn't working).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187446 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 21:04:42 +00:00
Howard Hinnant
0bb0a7c9ea Debug mode for unordered_multiset. The exercise spotted a few places I had missed on unordered_set, so I picked those up as well.
There are actually two debug modes:

   1.  -D_LIBCPP_DEBUG2 or -D_LIBCPP_DEBUG2=1
       This is a relatively expensive debug mode, but very thorough.  This is normally what you want to debug with, but may turn O(1) operations into O(N) operations.

   2.  -D_LIBCPP_DEBUG2=0
       This is "debug lite."  Only preconditions that can be checked with O(1) expense are checked.  For example range checking on an indexing operation.  But not iterator validity.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187369 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 19:05:47 +00:00