noexcept fix

master
Daniel Kolesa 2015-05-17 22:59:32 +01:00
parent 5a991f3e21
commit f4ef47e75a
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ namespace octa {
T *get() noexcept { return p_buf; }
const T *get() const noexcept { return p_buf; }
void swap(Array &v) noexcept {
void swap(Array &v) noexcept(swap(declval<T&>(), declval<T&>())) {
swap(p_buf, v.p_buf);
}
@ -63,7 +63,7 @@ namespace octa {
};
template<typename T, size_t N>
void swap(Array<T, N> &a, Array<T, N> &b) noexcept {
void swap(Array<T, N> &a, Array<T, N> &b) noexcept(noexcept(a.swap(b))) {
a.swap(b);
}
}