Commit Graph

137 Commits

Author SHA1 Message Date
Howard Hinnant 42a3046eef 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.

llvm-svn: 187636
2013-08-02 00:26:35 +00:00
Howard Hinnant e5c13decbe 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.

llvm-svn: 187369
2013-07-29 19:05:47 +00:00
Howard Hinnant 9a20da75ef I believe this finishes up debug mode for list. The testing is a little weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on.
llvm-svn: 179632
2013-04-16 21:42:36 +00:00
Howard Hinnant 97b8ebe600 I believe debug mode for vector<T> (T != bool) is complete. If anyone sees anything more they would like to see on it, please let me know. Debug mode is activated by compiling with -D_LIBCPP_DEBUG2=1. Eventually _LIBCPP_DEBUG2 will be renamed to just _LIBCPP_DEBUG.
llvm-svn: 178288
2013-03-28 20:35:29 +00:00
Marshall Clow 928f65a8aa Updated link to Marshall's instructions
llvm-svn: 177099
2013-03-14 19:00:34 +00:00
Howard Hinnant d70e6570fd Some forward-looking and optimistic documentation.
llvm-svn: 177093
2013-03-14 18:37:48 +00:00
Howard Hinnant 5b22e99e77 Michael van der Westhuizen: correction to the libcxx build instructions when built with libcxxrt on Linux.
llvm-svn: 176093
2013-02-26 16:27:55 +00:00
Howard Hinnant 65af0388b9 Bruce Mitchener: Minor typo fixes.
llvm-svn: 175274
2013-02-15 15:37:50 +00:00
Howard Hinnant af00dc0420 Michael van der Westhuizen: Update instructions for building on Linux.
llvm-svn: 174733
2013-02-08 19:10:36 +00:00
Michael J. Spencer bb8cfd0fec [CMake] Fix c++ abi library configuration on Linux.
You can now configure from the command line using:
-DLIBCXX_CXX_ABI=libsupc++
-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="path;path

Also documents how to build on Linux.

llvm-svn: 171316
2012-12-31 19:34:21 +00:00
Howard Hinnant 6852b55314 Fix type-o.
llvm-svn: 168715
2012-11-27 18:52:32 +00:00
Howard Hinnant 43a1f7b045 Remove by-chapter breakdown of what is implemented. The chart is now obsolete.
llvm-svn: 168713
2012-11-27 18:35:09 +00:00
Marshall Clow 497d9d2671 Change C++0x references to C++11, Fixes bug #12745
llvm-svn: 167930
2012-11-14 16:31:15 +00:00
Howard Hinnant 1c8358c13c Update instructions for building and using libc++ on Mac OS
llvm-svn: 167490
2012-11-06 21:31:37 +00:00
Marshall Clow c740e05316 Fix a typo in the docs
llvm-svn: 162335
2012-08-22 00:57:11 +00:00
Howard Hinnant 4df0a6adf6 Andrew Morrow: Among the various libc++ tests that currently don't pass on Linux are
localization/locale.categories/category.collate/category.ctype/locale.ctype.byname/is_1.pass.cpp
and scan_is.pass.cpp. The tests fail when the character class being
tested is compound, like ctype_base::alnum or ctype_base::graph,
because the existing series of conditionals in do_is an do_scan_is
will abort too early. For instance, if the character class being
tested is alnum, and the character is numeric, do_is will return false
because iswalpha_l will return false, 'result' becomes false, and the
'true' result from the later call to iswdigit_l ends up being ignored
. A similar problem exists in do_scan_is.

llvm-svn: 161192
2012-08-02 18:35:07 +00:00
Howard Hinnant d3673eb4e1 Andrew Morrow: The attached patch is an attempt to implement
std:🧵:hardware_concurrency for platforms that don't offer
sysctl, but do provide a POSIX sysconf and _SC_NPROCESSORS_ONLN.

llvm-svn: 161190
2012-08-02 18:17:49 +00:00
Howard Hinnant a30af5f7cd Andrew Morrow: This patch fixes
test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp
to accept '(nil)' as a valid representation for NULL so that the test
passes on Linux. The same thing is already done in some other tests,
like in /test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp.

llvm-svn: 161188
2012-08-02 18:12:06 +00:00
Howard Hinnant 8eb04fe53c Andrew Morrow: Attached is a writeup of the current state of the libc++ test suite on Linux.
There are a few tests that are listed as failing here for which I have
a patch in the works. I'll be sending those along soon. There are
others where I know what is going on but don't yet have a solution,
and I've included some notes for those. Several still need to be
investigated, mostly in localization and the regex test suite. I think
that many of these failures are due to locale implementation
variations that make the expected test results not match the actual
results. I'm not sure what the best way to make the tests accomodate
this sort of variation might be.

The failures in the unique_ptr test suite are very new and are caused
by a clang crash which I've not yet looked into.

llvm-svn: 161079
2012-07-31 21:30:28 +00:00
Howard Hinnant 355b660a4b Updated status
llvm-svn: 160959
2012-07-30 13:59:36 +00:00
Howard Hinnant fe9fe2dedc Updated the complete by-chapter graph
llvm-svn: 160943
2012-07-30 02:29:34 +00:00
Howard Hinnant 07ce90bb9d Jean-Daniel : clang now supports all required type_traits.
llvm-svn: 160510
2012-07-19 15:59:52 +00:00
Howard Hinnant 51eb2adb2d Jean-Daniel updates the libc++ index page to reflect not so recent changes in C++ standard status.
llvm-svn: 160509
2012-07-19 15:57:51 +00:00
Howard Hinnant 9f06558f86 New Windows libc++ test results provided by Ruben Van Boxem.
llvm-svn: 159852
2012-07-06 19:35:31 +00:00
Howard Hinnant 6b45660f14 link to Marshall's notes.
llvm-svn: 159791
2012-07-06 00:39:38 +00:00
Howard Hinnant 49c3b20737 Add documentation regarding -fno-rtti.
llvm-svn: 157157
2012-05-20 13:03:53 +00:00
Howard Hinnant 6e3e78acba Updated documentation contributed by Christopher Jefferson.
llvm-svn: 153955
2012-04-03 15:08:42 +00:00
Howard Hinnant 7319160e7c Clarify building instructions for 10.7
llvm-svn: 144910
2011-11-17 17:14:16 +00:00
Howard Hinnant 073458b1ab Windows support by Ruben Van Boxem.
llvm-svn: 142235
2011-10-17 20:05:10 +00:00
Howard Hinnant 287e20e824 Update instructions for building on Mac OS 10.6
llvm-svn: 141507
2011-10-09 15:25:34 +00:00
Howard Hinnant 20dde1e8fb Updated testit to run on Windows and fresh Windows results by Ruben Van Boxem
llvm-svn: 140950
2011-10-01 15:34:27 +00:00
Howard Hinnant 4f4d310e3e Provide link to developer's policy
llvm-svn: 140857
2011-09-30 16:58:02 +00:00
Howard Hinnant d7aac28ae9 Ruben's Windows test results.
llvm-svn: 140700
2011-09-28 15:44:39 +00:00
Howard Hinnant 55f2a50994 Address PR10909: http://llvm.org/bugs/show_bug.cgi?id=10909
llvm-svn: 139493
2011-09-12 14:15:45 +00:00
Alexis Hunt 397d787642 Given that __underlying_type is now available in clang, implement
std::underlying_type.

llvm-svn: 135410
2011-07-18 18:37:21 +00:00
Howard Hinnant 8298b9c2fd Add instructions for -U__STRICT_ANSI__ for Mac OS 10.6
llvm-svn: 133616
2011-06-22 12:13:55 +00:00
Howard Hinnant 5dbf45dfe0 CWG 1170 has been fixed for destructors
llvm-svn: 131290
2011-05-13 13:39:08 +00:00
Alexis Hunt 662d91f1cd __is_trivially_copyable now supplied by clang
llvm-svn: 131271
2011-05-13 00:32:09 +00:00
Howard Hinnant f208605bd4 Corrected misspelling
llvm-svn: 131265
2011-05-13 00:03:08 +00:00
Howard Hinnant b24491b73e Updated to reflect updated use of existing clang support
llvm-svn: 131264
2011-05-13 00:01:01 +00:00
Howard Hinnant 0cfdb9517e Updated type_traits and the type_traits design doc with recent work done in clang.
llvm-svn: 131090
2011-05-09 19:21:17 +00:00
Howard Hinnant 8e2617780a Jonathan Sauer updated is_base_of traits status
llvm-svn: 128349
2011-03-26 19:58:42 +00:00
Howard Hinnant 80a3cadab7 Jean-Daniel Dupas fixes install directions
llvm-svn: 126222
2011-02-22 14:18:34 +00:00
Howard Hinnant e4de279009 Updated getting started directions.
llvm-svn: 124452
2011-01-27 23:18:19 +00:00
Howard Hinnant 348bb56a82 type_traits intrinsics design
llvm-svn: 119776
2010-11-19 01:48:13 +00:00
Howard Hinnant 4b88967b70 type_traits intrinsics design
llvm-svn: 119775
2010-11-19 01:38:58 +00:00
Chris Lattner 58dffe641b libc++ is now dual licensed under both UIUC and MIT licenses.
llvm-svn: 119391
2010-11-16 21:40:19 +00:00
Howard Hinnant 6b4120915e Updated chart with weekly test results, and updated export files for chnages in <atomic>.
llvm-svn: 116943
2010-10-20 20:15:14 +00:00
Howard Hinnant b2b5513dcc Changing <atomic> to follow Design A
llvm-svn: 116742
2010-10-18 20:39:07 +00:00
Howard Hinnant 8166eca7b4 Update atomic Design A spec with reference C++ implementations for the purpose of documeting the semantics of each atomic operation.
llvm-svn: 116713
2010-10-18 16:40:13 +00:00
Howard Hinnant 1f1f63a698 Update atomic Design A spec
llvm-svn: 116707
2010-10-18 16:02:24 +00:00
Howard Hinnant 279312ec4e updated for weekly test results
llvm-svn: 116425
2010-10-13 20:24:31 +00:00
Howard Hinnant 71dee18c43 Updated atomic design docs
llvm-svn: 116065
2010-10-08 17:36:50 +00:00
Howard Hinnant dc2394f856 Update atomic design A
llvm-svn: 115913
2010-10-07 14:18:37 +00:00
Howard Hinnant a35a35fc90 Updated <atomic> docs with three design options
llvm-svn: 115791
2010-10-06 16:15:10 +00:00
Howard Hinnant b93850f370 A compiler writer's guide to <atomic>, minor update
llvm-svn: 115633
2010-10-05 17:22:28 +00:00
Howard Hinnant 1de2266f07 A compiler writer's guide to <atomic>
llvm-svn: 115629
2010-10-05 16:44:40 +00:00
Howard Hinnant 77f965b75a updated per weekly tests
llvm-svn: 115081
2010-09-29 20:15:25 +00:00
Howard Hinnant 5da7228ec0 Updated chart for weekly test results.
llvm-svn: 114029
2010-09-15 21:56:37 +00:00
Howard Hinnant 1c1620b269 Updated by-chapter-summary with weekly test results, and fixed up some bad paths in some tests caused by aligning the test suite with N3126.
llvm-svn: 113403
2010-09-08 20:31:42 +00:00
Howard Hinnant eea166dfd4 Updated current status.
llvm-svn: 113110
2010-09-05 17:31:48 +00:00
Howard Hinnant 1f7ae51ef2 Updated for weekly test results.
llvm-svn: 112737
2010-09-01 20:33:41 +00:00
Howard Hinnant 370bbab490 Updated for weekly test results
llvm-svn: 112078
2010-08-25 19:45:31 +00:00
Howard Hinnant 2807d4a58b Fixing whitespace problems
llvm-svn: 111769
2010-08-22 01:04:38 +00:00
Howard Hinnant 5e2f7b89e9 Updated by-chapter chart with weekly test results. Also did some prototyping on result_of, but if-def'd out the prototyped part (which the LWG may or may not accept)
llvm-svn: 111389
2010-08-18 18:52:04 +00:00
Howard Hinnant ea4c4fbf07 weekly by-chapter summary updated
llvm-svn: 109695
2010-07-28 23:23:51 +00:00
Howard Hinnant a9e0cfd729 Updated weekly by chapter summary
llvm-svn: 109135
2010-07-22 20:29:53 +00:00
Howard Hinnant c1198c320f A good start on extended posix regex. Loops working. Alternation working. Also update by-chapter completeness summary.
llvm-svn: 108548
2010-07-16 19:08:36 +00:00
Howard Hinnant 87ec03a2ea weekly update to by-chapter-summary, plus left and right anchor support in basic posix.
llvm-svn: 107938
2010-07-09 00:15:26 +00:00
Howard Hinnant 47a3e26cf8 Updated chart with weekly test results
llvm-svn: 107431
2010-07-01 21:39:12 +00:00
Howard Hinnant 24e98486a3 Continuing to work through regex, and updated libcxx_by_chapter.pdf with weekly test results
llvm-svn: 106790
2010-06-24 21:28:00 +00:00
Howard Hinnant 6cf1b791dd updated for weekly tests
llvm-svn: 106288
2010-06-18 16:13:40 +00:00
Dan Gohman f4e31c8974 Fix an apparent typo.
llvm-svn: 105467
2010-06-04 14:16:02 +00:00
Howard Hinnant 3b61d21fac updated by-chapter-complete chart
llvm-svn: 105402
2010-06-03 19:31:49 +00:00
Howard Hinnant c8edcb3651 weekly test results plus a bug fix clang found
llvm-svn: 104877
2010-05-27 20:06:01 +00:00
Howard Hinnant 1f044b6195 weekly test results
llvm-svn: 104266
2010-05-20 19:58:15 +00:00
Howard Hinnant 97ae3d5183 weekly test results
llvm-svn: 103732
2010-05-13 20:10:39 +00:00
Chris Lattner d55fd111d1 wording.
llvm-svn: 103658
2010-05-12 22:34:21 +00:00
Chris Lattner a940b5b72e wording
llvm-svn: 103657
2010-05-12 22:33:00 +00:00
Chris Lattner f005e8d167 tweak from cjefferson
llvm-svn: 103656
2010-05-12 22:30:22 +00:00
Chris Lattner 27de3d6459 improve the 'current status' section to say what *is* there in
addition to what is not.

Add a big "why libc++" section to address a pretty major FAQ.

llvm-svn: 103655
2010-05-12 22:21:15 +00:00
Chris Lattner f9e7e3ab11 fix more links
llvm-svn: 103511
2010-05-11 20:53:16 +00:00
Howard Hinnant 38a59279ef Fixed svn link
llvm-svn: 103510
2010-05-11 20:51:20 +00:00
Chris Lattner 6f12a7f252 cxx not cpp
llvm-svn: 103501
2010-05-11 20:37:52 +00:00
Chris Lattner 1f3e58543d add css files, also, test commit.
llvm-svn: 103498
2010-05-11 20:29:17 +00:00
Howard Hinnant 180e1d7f56 updated web page with clang mailing list link
llvm-svn: 103491
2010-05-11 19:53:34 +00:00
Howard Hinnant 3e519524c1 libcxx initial import
llvm-svn: 103490
2010-05-11 19:42:16 +00:00