I am receiving the following warning when compiling with -Wconversion:
boost/stacktrace/detail/to_dec_array.hpp: In function ‘boost::array<char, 40ul> boost::stacktrace::detail::to_dec_array(std::size_t)’:
boost/stacktrace/detail/to_dec_array.hpp:34:31: warning: conversion to ‘char’ from ‘std::size_t {aka long unsigned int}’ may alter its value [-Wconversion]
ret[digits - i] = '0' + (value % 10);
Although it is not an error, I think a static_cast can be used to avoid unnecessary compiler output:
I am receiving the following warning when compiling with
-Wconversion
:Although it is not an error, I think a
static_cast
can be used to avoid unnecessary compiler output: