[libcxx] r271475 - Mark LWG issue 2250 as complete
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 1 21:03:31 PDT 2016
Author: ericwf
Date: Wed Jun 1 23:03:31 2016
New Revision: 271475
URL: http://llvm.org/viewvc/llvm-project?rev=271475&view=rev
Log:
Mark LWG issue 2250 as complete
Modified:
libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp
libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/test.pass.cpp
libcxx/trunk/www/cxx1z_status.html
Modified: libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp Wed Jun 1 23:03:31 2016
@@ -17,8 +17,11 @@
#include <thread>
#include <atomic>
+#include <system_error>
#include <cassert>
+#include "test_macros.h"
+
std::atomic_bool done(false);
class G
@@ -57,6 +60,8 @@ public:
int G::n_alive = 0;
bool G::op_run = false;
+void foo() {}
+
int main()
{
{
@@ -70,4 +75,16 @@ int main()
assert(G::n_alive == 1);
}
assert(G::n_alive == 0);
+#ifndef TEST_HAS_NO_EXCEPTION
+ {
+ std::thread t0(foo);
+ assert(t0.joinable());
+ t0.detach();
+ assert(!t0.joinable());
+ try {
+ t0.detach();
+ } catch (std::system_error const& ec) {
+ }
+ }
+#endif
}
Modified: libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp Wed Jun 1 23:03:31 2016
@@ -19,6 +19,9 @@
#include <new>
#include <cstdlib>
#include <cassert>
+#include <system_error>
+
+#include "test_macros.h"
class G
{
@@ -42,6 +45,8 @@ public:
int G::n_alive = 0;
bool G::op_run = false;
+void foo() {}
+
int main()
{
{
@@ -50,5 +55,23 @@ int main()
assert(t0.joinable());
t0.join();
assert(!t0.joinable());
+#ifndef TEST_HAS_NO_EXCEPTIONS
+ try {
+ t0.join();
+ assert(false);
+ } catch (std::system_error const&) {
+ }
+#endif
+ }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+ {
+ std::thread t0(foo);
+ t0.detach();
+ try {
+ t0.join();
+ assert(false);
+ } catch (std::system_error const&) {
+ }
}
+#endif
}
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp Wed Jun 1 23:03:31 2016
@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: libcpp-no-exceptions
// template <class charT>
// explicit bitset(const charT* str,
// typename basic_string<charT>::size_type n = basic_string<charT>::npos,
@@ -18,22 +17,19 @@
#include <algorithm> // for 'min' and 'max'
#include <stdexcept> // for 'invalid_argument'
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
+#include "test_macros.h"
template <std::size_t N>
void test_char_pointer_ctor()
{
{
- try
- {
- std::bitset<N> v("xxx1010101010xxxx");
- assert(false);
- }
- catch (std::invalid_argument&)
- {
- }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+ try {
+ std::bitset<N> v("xxx1010101010xxxx");
+ assert(false);
+ }
+ catch (std::invalid_argument&) {}
+#endif
}
{
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp Wed Jun 1 23:03:31 2016
@@ -12,21 +12,26 @@
#include <bitset>
#include <cassert>
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
+#include "test_macros.h"
template <std::size_t N>
void test_default_ctor()
{
{
- _LIBCPP_CONSTEXPR std::bitset<N> v1;
- assert(v1.size() == N);
- for (std::size_t i = 0; i < N; ++i)
- assert(v1[i] == false);
+ TEST_CONSTEXPR std::bitset<N> v1;
+ assert(v1.size() == N);
+ for (std::size_t i = 0; i < N; ++i)
+ assert(v1[i] == false);
+ }
+#if TEST_STD_VER >= 11
+ {
+ constexpr std::bitset<N> v1;
+ static_assert(v1.size() == N, "");
}
+#endif
}
+
int main()
{
test_default_ctor<0>();
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp Wed Jun 1 23:03:31 2016
@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: libcpp-no-exceptions
// test bitset(string, pos, n, zero, one);
#include <bitset>
@@ -15,67 +14,60 @@
#include <algorithm> // for 'min' and 'max'
#include <stdexcept> // for 'invalid_argument'
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
+#include "test_macros.h"
template <std::size_t N>
void test_string_ctor()
{
+#ifndef TEST_HAS_NO_EXCEPTIONS
{
- try
- {
- std::string str("xxx1010101010xxxx");
- std::bitset<N> v(str, str.size()+1, 10);
- assert(false);
- }
- catch (std::out_of_range&)
- {
- }
+ try {
+ std::string str("xxx1010101010xxxx");
+ std::bitset<N> v(str, str.size()+1, 10);
+ assert(false);
+ }
+ catch (std::out_of_range&)
+ {
+ }
+ }
+ {
+ try {
+ std::string str("xxx1010101010xxxx");
+ std::bitset<N> v(str, 2, 10);
+ assert(false);
+ }
+ catch (std::invalid_argument&)
+ {
+ }
+ }
+ {
+ try {
+ std::string str("xxxbababababaxxxx");
+ std::bitset<N> v(str, 2, 10, 'a', 'b');
+ assert(false);
+ }
+ catch (std::invalid_argument&)
+ {
+ }
}
-
- {
- try
+#endif // TEST_HAS_NO_EXCEPTIONS
{
std::string str("xxx1010101010xxxx");
- std::bitset<N> v(str, 2, 10);
- assert(false);
- }
- catch (std::invalid_argument&)
- {
+ std::bitset<N> v(str, 3, 10);
+ std::size_t M = std::min<std::size_t>(N, 10);
+ for (std::size_t i = 0; i < M; ++i)
+ assert(v[i] == (str[3 + M - 1 - i] == '1'));
+ for (std::size_t i = 10; i < N; ++i)
+ assert(v[i] == false);
}
- }
-
- {
- std::string str("xxx1010101010xxxx");
- std::bitset<N> v(str, 3, 10);
- std::size_t M = std::min<std::size_t>(N, 10);
- for (std::size_t i = 0; i < M; ++i)
- assert(v[i] == (str[3 + M - 1 - i] == '1'));
- for (std::size_t i = 10; i < N; ++i)
- assert(v[i] == false);
- }
-
- {
- try
{
std::string str("xxxbababababaxxxx");
- std::bitset<N> v(str, 2, 10, 'a', 'b');
- assert(false);
- }
- catch (std::invalid_argument&)
- {
- }
- }
-
- {
- std::string str("xxxbababababaxxxx");
- std::bitset<N> v(str, 3, 10, 'a', 'b');
- std::size_t M = std::min<std::size_t>(N, 10);
- for (std::size_t i = 0; i < M; ++i)
- assert(v[i] == (str[3 + M - 1 - i] == 'b'));
- for (std::size_t i = 10; i < N; ++i)
- assert(v[i] == false);
+ std::bitset<N> v(str, 3, 10, 'a', 'b');
+ std::size_t M = std::min<std::size_t>(N, 10);
+ for (std::size_t i = 0; i < M; ++i)
+ assert(v[i] == (str[3 + M - 1 - i] == 'b'));
+ for (std::size_t i = 10; i < N; ++i)
+ assert(v[i] == false);
}
}
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp Wed Jun 1 23:03:31 2016
@@ -13,22 +13,26 @@
#include <cassert>
#include <algorithm> // for 'min' and 'max'
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
+#include "test_macros.h"
template <std::size_t N>
void test_val_ctor()
{
{
- _LIBCPP_CONSTEXPR std::bitset<N> v(0xAAAAAAAAAAAAAAAAULL);
- assert(v.size() == N);
- unsigned M = std::min<std::size_t>(N, 64);
- for (std::size_t i = 0; i < M; ++i)
- assert(v[i] == (i & 1));
- for (std::size_t i = M; i < N; ++i)
- assert(v[i] == false);
+ TEST_CONSTEXPR std::bitset<N> v(0xAAAAAAAAAAAAAAAAULL);
+ assert(v.size() == N);
+ unsigned M = std::min<std::size_t>(N, 64);
+ for (std::size_t i = 0; i < M; ++i)
+ assert(v[i] == (i & 1));
+ for (std::size_t i = M; i < N; ++i)
+ assert(v[i] == false);
+ }
+#if TEST_STD_VER >= 11
+ {
+ constexpr std::bitset<N> v(0xAAAAAAAAAAAAAAAAULL);
+ static_assert(v.size() == N, "");
}
+#endif
}
int main()
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp Wed Jun 1 23:03:31 2016
@@ -14,10 +14,6 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
-
template <std::size_t N>
std::bitset<N>
make_bitset()
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp Wed Jun 1 23:03:31 2016
@@ -13,11 +13,6 @@
#include <bitset>
#include <cassert>
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
-
template <std::size_t N>
void test_reset_one()
{
Modified: libcxx/trunk/test/std/utilities/template.bitset/bitset.members/test.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.members/test.pass.cpp?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/template.bitset/bitset.members/test.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/template.bitset/bitset.members/test.pass.cpp Wed Jun 1 23:03:31 2016
@@ -14,10 +14,6 @@
#include <cstdlib>
#include <cassert>
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
-
template <std::size_t N>
std::bitset<N>
make_bitset()
Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=271475&r1=271474&r2=271475&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Wed Jun 1 23:03:31 2016
@@ -176,7 +176,7 @@
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2224">2224</a></td><td>Ambiguous status of access to non-live objects</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2234">2234</a></td><td><tt>assert()</tt> should allow usage in constant expressions</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2244">2244</a></td><td>Issue on <tt>basic_istream::seekg</tt></td><td>Kona</td><td>Complete</td></tr>
- <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2250">2250</a></td><td>Follow-up On Library Issue 2207</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2250">2250</a></td><td>Follow-up On Library Issue 2207</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2259">2259</a></td><td>Issues in 17.6.5.5 rules for member functions</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2273">2273</a></td><td><tt>regex_match</tt> ambiguity</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2336">2336</a></td><td><tt>is_trivially_constructible/is_trivially_assignable</tt> traits are always false</td><td>Kona</td><td></td></tr>
More information about the cfe-commits
mailing list