Skip to content

Commit 379cfaf

Browse files
committed
msvc warning
1 parent 562a5df commit 379cfaf

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

include/boost/multi/array_ref.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,15 @@ struct array_types : private Layout { // cppcheck-suppress syntaxError ; false
254254
using layout_type::extensions;
255255
using layout_type::extents;
256256

257-
using typename layout_type::extensions_type;
257+
#ifdef _MSC_VER
258+
#pragma warning(push)
259+
#pragma warning(disable: 4996)
260+
#endif
261+
using typename layout_type::extensions_type; // TODO(correaa) remove
262+
#ifdef _MSC_VER
263+
#pragma warning(pop)
264+
#endif
265+
258266
using typename layout_type::extents_type;
259267

260268
/// Returns the index extensions (structured cartesian product of half-open ranges) for all dimensions as an `extents_type`

test/sedenion.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro
3030
}
3131
#ifdef __clang__
3232
{
33-
multi::array<int, 12> arr( multi::extents_t<12>{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 0);
33+
multi::array<int, 12> arr(multi::extents_t<12>{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 0);
3434
BOOST_TEST( arr.num_elements() == 256*2*2*2*2 );
3535
}
3636
{
37-
multi::array<int, 14> arr( multi::extents_t<14>{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 0);
37+
multi::array<int, 14> arr(multi::extents_t<14>{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 0);
3838
BOOST_TEST( arr.num_elements() == 256*2*2*2*2*2*2 );
3939
}
4040
{
41-
multi::array<int, 16> arr( multi::extents_t<16>{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 0);
41+
multi::array<int, 16> arr(multi::extents_t<16>{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 0);
4242
BOOST_TEST( arr.num_elements() == 65536 );
4343
}
4444
#endif

0 commit comments

Comments
 (0)