Skip to content

Commit abe7b0f

Browse files
authored
Fix potential termination with noexcept specifier (#2865)
1 parent 1089342 commit abe7b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/xtensor/core/xaccessible.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace xt
3636
using const_reference = typename inner_types::const_reference;
3737
using size_type = typename inner_types::size_type;
3838

39-
size_type size() const noexcept;
39+
size_type size() const noexcept(noexcept(derived_cast().shape()));
4040
size_type dimension() const noexcept;
4141
size_type shape(size_type index) const;
4242

@@ -138,7 +138,7 @@ namespace xt
138138
* Returns the size of the expression.
139139
*/
140140
template <class D>
141-
inline auto xconst_accessible<D>::size() const noexcept -> size_type
141+
inline auto xconst_accessible<D>::size() const noexcept(noexcept(derived_cast().shape())) -> size_type
142142
{
143143
return compute_size(derived_cast().shape());
144144
}

0 commit comments

Comments
 (0)