Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost gil narrowing error #1970

Closed
springmeyer opened this issue Jul 29, 2013 · 1 comment
Closed

boost gil narrowing error #1970

springmeyer opened this issue Jul 29, 2013 · 1 comment
Labels
Milestone

Comments

@springmeyer
Copy link
Member

Need to report this upstream in boost. For now we can workaround with -fpermissive or -Wno-c++11-narrowing as in 64efd5f

/Users/dane/projects/mapnik-packaging/osx/out/build-libc++-x86_64/include/boost/gil/channel_algorithm.hpp:54:85: 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> {};
                                                                                    ^
/Users/dane/projects/mapnik-packaging/osx/out/build-libc++-x86_64/include/boost/gil/channel_algorithm.hpp:204:19: note: in instantiation of
      template class 'boost::gil::detail::unsigned_integral_max_value<unsigned long>' requested here
        if (src > unsigned_integral_max_value<uintmax_t>::value - div2)
                  ^
1 error generated.
@springmeyer
Copy link
Member Author

looking in the boost trunk sources this appears fixed and reads:

template <typename UnsignedIntegralChannel>
struct unsigned_integral_max_value : public mpl::integral_c<UnsignedIntegralChannel,integer_traits< UnsignedIntegralChannel>::const_max> {};

So, it looks like we can remove the -Wc++11-narrowing flag at boost 1_55 ( presumably the next release)

herm added a commit that referenced this issue Oct 13, 2013
* commit 'dd5bb6c643622d2374edf14dda2d1c47b2187c4c': (22 commits)
  test_python.py was still broken - actually fix it - refs #1513
  add note about miniz porting and #1967
  make note about need for -Wno-c++11-narrowing - closes #1970
  scons: when linking statically on linux always link -ldl
  scons: fix configure check for sqlite_rtree on linux when sqlite3 is statically linked
  make gdal lib check more robust
  boost gil narrowing only impacts clang++ it appears and not g++ 4.6.3 with -std=c++0x (TODO: checkout newer g++ with -std=c++11
  fix narrowing issue in miniz - closes #1967
  fix up type casting
  fix PHOENIX_V3 compile of svg generator
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant