Skip to content

Commit bf3d9e6

Browse files
authored
Merge pull request #793 from trcrsired/master
use maybe unused. we need to ensure code could compile instead of usi…
2 parents 74e13fe + efc7ec1 commit bf3d9e6

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

include/fast_io_unit/string_impl/msvc_stl.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ inline constexpr bool msvc_stl_xstring_activate_string_annotation{
6565
#endif
6666
};
6767

68-
inline constexpr bool msvc_stl_xstring_get_asan_string_should_annotate() noexcept
68+
inline _CONSTEXPR20 bool msvc_stl_xstring_get_asan_string_should_annotate() noexcept
6969
{
7070
#ifdef FAST_IO_MSVC_STL_INSERT_STRING_ANNOTATION
7171
if constexpr (::fast_io::details::string_hack::msvc_stl_xstring_activate_string_annotation)
@@ -79,21 +79,16 @@ inline constexpr bool msvc_stl_xstring_get_asan_string_should_annotate() noexcep
7979
return false;
8080
}
8181

82-
#ifdef FAST_IO_MSVC_STL_INSERT_STRING_ANNOTATION
8382
inline _CONSTEXPR20 void msvc_stl_sanitizer_annotate_contiguous_container(
84-
void const *_First, void const *_End, void const *_Old_last, void const *_New_last) noexcept
83+
[[maybe_unused]] void const *_First, [[maybe_unused]] void const *_End, [[maybe_unused]] void const *_Old_last, [[maybe_unused]] void const *_New_last) noexcept
8584
{
85+
#ifdef FAST_IO_MSVC_STL_INSERT_STRING_ANNOTATION
8686
if (!__builtin_is_constant_evaluated())
8787
{
8888
_CSTD __sanitizer_annotate_contiguous_container(_First, _End, _Old_last, _New_last);
8989
}
90-
}
91-
#else
92-
inline _CONSTEXPR20 void msvc_stl_sanitizer_annotate_contiguous_container(
93-
void const *, void const *, void const *, void const *) noexcept
94-
{
95-
}
9690
#endif
91+
}
9792
/*
9893
https://github.com/microsoft/STL/blob/a357ff1750d3f6dffd54b10d537e93e0accfcc92/stl/inc/xstring#L617
9994
*/

0 commit comments

Comments
 (0)