Boost logo

Boost Users :

From: Mark Ruzon (mark34_at_[hidden])
Date: 2007-08-16 12:38:38


This reindex function in multi_array/view.hpp is apparently being compiled with
BOOST_NO_SFINAE not being defined.

  template <class BaseList>
#ifdef BOOST_NO_SFINAE
  void
#else
  typename
  disable_if<typename boost::is_integral<BaseList>::type,void >::type
#endif
  reindex(const BaseList& values) {
    boost::function_requires<
      detail::multi_array::CollectionConcept<BaseList> >();
    boost::detail::multi_array::
      copy_n(values.begin(),num_dimensions(),index_base_list_.begin());
    origin_offset_ =
      this->calculate_indexing_offset(stride_list_,index_base_list_);
  }

I am getting the following error, because naturally there is no return statement.

/usr/include/c++/boost_1_34_1/boost/multi_array/view.hpp: In member function
   `boost::disable_if<boost::is_integral<BaseList>::type, void>::type
   boost::detail::multi_array::const_multi_array_view<T, NumDims,
   TPtr>::reindex(const BaseList&)':
/usr/include/c++/boost_1_34_1/boost/multi_array/view.hpp:89: warning: no return
   statement in function returning non-void

Is there a fix for this? Shouldn't there be another #ifdef with a return
statement? How do I know if I should define BOOST_NO_SFINAE?

Sincerely,
Mark Ruzon


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net