#include "min_allocator.h"
#include "asan_testing.h"
+struct Throws {
+ Throws() : v_(0) {}
+ Throws(int v) : v_(v) {}
+ Throws(const Throws &rhs) : v_(rhs.v_) { if (sThrows) throw 1; }
+ Throws( Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; }
+ Throws& operator=(const Throws &rhs) { v_ = rhs.v_; return *this; }
+ Throws& operator=( Throws &&rhs) { v_ = rhs.v_; return *this; }
+ int v_;
+ static bool sThrows;
+ };
+
+bool Throws::sThrows = false;
+
int main()
{
{
assert(is_contiguous_container_asan_correct(l1));
}
#endif
+// Test for LWG2853:
+// Throws: Nothing unless an exception is thrown by the assignment operator or move assignment operator of T.
+ {
+ Throws arr[] = {1, 2, 3};
+ std::vector<Throws> v(arr, arr+3);
+ Throws::sThrows = true;
+ v.erase(v.begin());
+ v.erase(--v.end());
+ v.erase(v.begin());
+ assert(v.size() == 0);
+ }
}
#include "min_allocator.h"
#include "asan_testing.h"
+struct Throws {
+ Throws() : v_(0) {}
+ Throws(int v) : v_(v) {}
+ Throws(const Throws &rhs) : v_(rhs.v_) { if (sThrows) throw 1; }
+ Throws( Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; }
+ Throws& operator=(const Throws &rhs) { v_ = rhs.v_; return *this; }
+ Throws& operator=( Throws &&rhs) { v_ = rhs.v_; return *this; }
+ int v_;
+ static bool sThrows;
+ };
+
+bool Throws::sThrows = false;
+
int main()
{
int a1[] = {1, 2, 3};
assert(is_contiguous_container_asan_correct(outer[1]));
}
#endif
+// Test for LWG2853:
+// Throws: Nothing unless an exception is thrown by the assignment operator or move assignment operator of T.
+ {
+ Throws arr[] = {1, 2, 3};
+ std::vector<Throws> v(arr, arr+3);
+ Throws::sThrows = true;
+ v.erase(v.begin(), --v.end());
+ assert(v.size() == 1);
+ v.erase(v.begin(), v.end());
+ assert(v.size() == 0);
+ }
}
<tr><td><a href="http://wg21.link/LWG2838">2838</a></td><td>is_literal_type specification needs a little cleanup</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2842">2842</a></td><td>in_place_t check for optional::optional(U&&) should decay U</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2850">2850</a></td><td>std::function move constructor does unnecessary work</td><td>Kona</td><td></td></tr>
- <tr><td><a href="http://wg21.link/LWG2853">2853</a></td><td>Possible inconsistency in specification of erase in [vector.modifiers]</td><td>Kona</td><td></td></tr>
+ <tr><td><a href="http://wg21.link/LWG2853">2853</a></td><td>Possible inconsistency in specification of erase in [vector.modifiers]</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2855">2855</a></td><td>std::throw_with_nested("string_literal")</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2857">2857</a></td><td>{variant,optional,any}::emplace should return the constructed value</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2861">2861</a></td><td>basic_string should require that charT match traits::char_type</td><td>Kona</td><td>Complete</td></tr>
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
</table>
- <p>Last Updated: 13-Apr-2017</p>
+ <p>Last Updated: 17-Apr-2017</p>
</div>
</body>
</html>