Skip to content

Commit abce45a

Browse files
authored
Add braces around initializers. (#2855)
GCC 13.3 requires an additional layer of braces around brace-initializers for certain types. We've seen this in other projects before, and the addition of the additional layer of braces has always been fine with all other compilers.
1 parent b17cb86 commit abce45a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/xtensor/misc/xmanipulation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ namespace xt
611611
template <class E, class Tag = check_policy::none>
612612
inline auto squeeze(E&& e, std::size_t axis, Tag check_policy = Tag())
613613
{
614-
return squeeze(std::forward<E>(e), std::array<std::size_t, 1>{axis}, check_policy);
614+
return squeeze(std::forward<E>(e), std::array<std::size_t, 1>{{axis}}, check_policy);
615615
}
616616

617617
/// @endcond

include/xtensor/views/xslice.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ namespace xt
761761
}
762762

763763
XTENSOR_GLOBAL_CONSTEXPR xtuph _{};
764-
XTENSOR_GLOBAL_CONSTEXPR rangemaker<> _r = rangemaker<>({0, 0, 0});
764+
XTENSOR_GLOBAL_CONSTEXPR rangemaker<> _r = rangemaker<>({{0, 0, 0}});
765765
XTENSOR_GLOBAL_CONSTEXPR xall_tag _a{};
766766
XTENSOR_GLOBAL_CONSTEXPR xnewaxis_tag _n{};
767767
XTENSOR_GLOBAL_CONSTEXPR xellipsis_tag _e{};

0 commit comments

Comments
 (0)