Skip to content

Commit

Permalink
Disable msvc-14.1 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Nov 12, 2024
1 parent 1f0762a commit 03370f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/hash2/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This example demonstrates calculating the MD5 digest of a data array, embedded i

[source]
----
include::../../example/compile_time.cpp[lines=5..-1]
include::../../example/compile_time.cpp[lines=11..-1]
----

Since the `constexpr` overload of `update` takes `unsigned char const*` (`void const*` is not allowed in `constexpr` functions), if the
Expand All @@ -82,6 +82,6 @@ use `hash_append_range` instead of calling `update`, as in the following example

[source]
----
include::../../example/compile_time_2.cpp[lines=5..-1]
include::../../example/compile_time_2.cpp[lines=11..-1]
----

6 changes: 6 additions & 0 deletions example/compile_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/config.hpp>

#if defined(BOOST_MSVC) && BOOST_MSVC < 1920
# pragma warning(disable: 4307) // integral constant overflow
#endif

#include <boost/hash2/md5.hpp>
#include <iostream>

Expand Down
6 changes: 6 additions & 0 deletions example/compile_time_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/config.hpp>

#if defined(BOOST_MSVC) && BOOST_MSVC < 1920
# pragma warning(disable: 4307) // integral constant overflow
#endif

#include <boost/hash2/sha2.hpp>
#include <boost/hash2/hash_append.hpp>
#include <iostream>
Expand Down

0 comments on commit 03370f7

Please sign in to comment.