diff options
author | Louis Dionne <ldionne@apple.com> | 2019-04-15 18:00:01 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-04-15 18:00:01 +0000 |
commit | e1e1bd7f9c4a1e22cb3813c6297c543fc3be3a9d (patch) | |
tree | 8e18cac48c8e11fd8db9038381d93b6ec3b7ae90 /libcxx | |
parent | 8ae68f26489a2f9d9f7e33d77bf2cdd8a9d388cd (diff) | |
download | bcm5719-llvm-e1e1bd7f9c4a1e22cb3813c6297c543fc3be3a9d.tar.gz bcm5719-llvm-e1e1bd7f9c4a1e22cb3813c6297c543fc3be3a9d.zip |
[libc++] Fix debug_less test in C++03
We were using C++11 features but the test needs to work in C++03 too.
llvm-svn: 358433
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/test/libcxx/algorithms/debug_less.pass.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp index 538630364b8..260900b7d43 100644 --- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp +++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp @@ -236,13 +236,13 @@ void test_non_const_arg_cmp() { } struct ValueIterator { - using iterator_category = std::input_iterator_tag; - using value_type = size_t; - using difference_type = ptrdiff_t; - using reference = size_t; - using pointer = size_t*; + typedef std::input_iterator_tag iterator_category; + typedef size_t value_type; + typedef ptrdiff_t difference_type; + typedef size_t reference; + typedef size_t* pointer; - ValueIterator() = default; + ValueIterator() { } reference operator*() { return 0; } ValueIterator& operator++() { return *this; } @@ -253,13 +253,13 @@ struct ValueIterator { void test_value_iterator() { // Ensure no build failures when iterators return values, not references. - assert(0 == std::lexicographical_compare(ValueIterator{}, ValueIterator{}, - ValueIterator{}, ValueIterator{})); + assert(0 == std::lexicographical_compare(ValueIterator(), ValueIterator(), + ValueIterator(), ValueIterator())); } void test_value_categories() { std::less<int> l; - std::__debug_less<std::less<int>> dl(l); + std::__debug_less<std::less<int> > dl(l); int lvalue = 42; const int const_lvalue = 101; |