Fix some cases of C++11 exception specifications on constructors with =default or =delete
This commit is contained in:
parent
97a9f5896a
commit
fcd0480364
3 changed files with 19 additions and 2 deletions
|
|
@ -69,4 +69,13 @@ struct moveonly {
|
||||||
moveonly& operator=(moveonly&&) = default;
|
moveonly& operator=(moveonly&&) = default;
|
||||||
~moveonly() = default;
|
~moveonly() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ConstructorThrow {
|
||||||
|
ConstructorThrow() throw() = default;
|
||||||
|
ConstructorThrow(const ConstructorThrow&) throw() = delete;
|
||||||
|
ConstructorThrow(ConstructorThrow&&) throw() = delete;
|
||||||
|
ConstructorThrow& operator=(const ConstructorThrow&) throw() = delete;
|
||||||
|
~ConstructorThrow() throw() = default;
|
||||||
|
};
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,9 @@ struct NoExceptAbstract {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NoExceptDefaultDelete {
|
struct NoExceptDefaultDelete {
|
||||||
// NoExceptDefaultDelete() noexcept = default;
|
template<typename T> NoExceptDefaultDelete(T) noexcept = delete;
|
||||||
// NoExceptDefaultDelete(const NoExceptDefaultDelete&) noexcept = delete;
|
NoExceptDefaultDelete() noexcept = default;
|
||||||
|
NoExceptDefaultDelete(const NoExceptDefaultDelete&) noexcept = delete;
|
||||||
NoExceptDefaultDelete(NoExceptDefaultDelete&&) = delete;
|
NoExceptDefaultDelete(NoExceptDefaultDelete&&) = delete;
|
||||||
NoExceptDefaultDelete& operator=(const NoExceptDefaultDelete&) = delete;
|
NoExceptDefaultDelete& operator=(const NoExceptDefaultDelete&) = delete;
|
||||||
~NoExceptDefaultDelete() noexcept = default;
|
~NoExceptDefaultDelete() noexcept = default;
|
||||||
|
|
|
||||||
|
|
@ -6780,6 +6780,13 @@ ctor_end : cpp_const ctor_initializer SEMI {
|
||||||
$$.throwf = 0;
|
$$.throwf = 0;
|
||||||
$$.nexcept = 0;
|
$$.nexcept = 0;
|
||||||
}
|
}
|
||||||
|
| exception_specification EQUAL default_delete SEMI {
|
||||||
|
$$.have_parms = 0;
|
||||||
|
$$.defarg = $3.val;
|
||||||
|
$$.throws = $1.throws;
|
||||||
|
$$.throwf = $1.throwf;
|
||||||
|
$$.nexcept = $1.nexcept;
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
ctor_initializer : COLON mem_initializer_list
|
ctor_initializer : COLON mem_initializer_list
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue