Subject: [Boost-bugs] [Boost C++ Libraries] #9517: boost gil compile error because of type narrowing
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-12-22 20:19:07
#9517: boost gil compile error because of type narrowing
------------------------------+---------------------
Reporter: ryan.burn@⦠| Owner: hljin
Type: Bugs | Status: new
Milestone: To Be Determined | Component: GIL
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
line 204 in boost/gil/channel_algorithm.hpp
if (src > unsigned_integral_max_value<uintmax_t>::value - div2)
gives me this error with clang
error: non-type template argument
evaluates to -1, which cannot be narrowed to type 'unsigned long'
[-Wc++11-narrowing]
struct unsigned_integral_max_value : public
mpl::integral_c<UnsignedIntegralChannel,-1> {};
can you just replace with std::numeric_limits<unitmax_t>::max()?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9517> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC