PR libstdc++/64650
* include/experimental/optional (bad_optional_access): Add default
constructor.
* testsuite/experimental/optional/requirements.cc: Test for default
constructor.
From-SVN: r219889
+2015-01-20 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/64650
+ * include/experimental/optional (bad_optional_access): Add default
+ constructor.
+ * testsuite/experimental/optional/requirements.cc: Test for default
+ constructor.
+
2015-01-20 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_map.h (map::find<>, map::count<>,
class bad_optional_access : public logic_error
{
public:
- // XXX Should not be inline
- explicit bad_optional_access(const string& __arg) : logic_error(__arg) { }
+ bad_optional_access() : logic_error("bad optional access") { }
+ // XXX This constructor is non-standard. Should not be inline
explicit bad_optional_access(const char* __arg) : logic_error(__arg) { }
virtual ~bad_optional_access() noexcept = default;
#include <tuple>
+using std::experimental::bad_optional_access;
+static_assert( std::is_default_constructible<bad_optional_access>::value, "" );
+
struct trivially_destructible
{
trivially_destructible() = delete;