id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4131,Including boost/range/numeric.hpp causes compile errors without defining NDEBUG,Naoki Yoshioka ,Neil Groves,"Although boost::inner_product in boost/range/numeric.hpp calls a function template boost::distance for static asserting, the header file has no statement to include boost/range/distance.hpp. Therefore, for example, the following code cannot be compiled without -DNDEBUG option. {{{ // test.cpp #include int main() { int array[3] = {0, 1, 2}; boost::accumulate(array, 0); return 0; } }}} The errors are as follows; {{{ $ g++ --version g++ (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++ test.cpp In file included from test.cpp:1: include/boost/range/numeric.hpp: In function ‘Value boost::inner_product(const SinglePassRange1&, const SinglePassRange2&, Value)’: include/boost/range/numeric.hpp:59: error: ‘distance’ is not a member of ‘boost’ include/boost/range/numeric.hpp:59: error: ‘distance’ is not a member of ‘boost’ include/boost/range/numeric.hpp: In function ‘Value boost::inner_product(const SinglePassRange1&, const SinglePassRange2&, Value, BinaryOperation1, BinaryOperat ion2)’: include/boost/range/numeric.hpp:74: error: ‘distance’ is not a member of ‘boost’ include/boost/range/numeric.hpp:74: error: ‘distance’ is not a member of ‘boost’ $ g++ test.cpp -DNDEBUG }}}",Bugs,closed,Boost 1.43.0,range,Boost Development Trunk,Problem,fixed,,