Boost logo

Boost Users :

From: Allen Zhao (xlz_at_[hidden])
Date: 2006-01-07 18:11:54


Hi, All,

As I am working to get libtorrent working on Win32 with MSVC 7.0, I
notice that BOOST_NO_MEMBER_TEMPLATES is defined by default. As a
consquence, some of the functions in multi_index_container.cpp is not
defined.

For example,

#if !defined(BOOST_NO_MEMBER_TEMPLATES)
  template<int N>
  struct nth_index
  {
    BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
    typedef typename mpl::at_c<index_type_list,N>::type type;
  };

  template<int N>
  typename nth_index<N>::type& get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int,N))
  {
    BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
    return *this;
  }

  template<int N>
  const typename nth_index<N>::type& get(
    BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int,N))const
  {
    BOOST_STATIC_ASSERT(N>=0&&N<mpl::size<index_type_list>::type::value);
    return *this;
  }
#endif

Is there anything to enable these functions when
BOOST_NO_MEMBER_TEMPLATES is undef? Any suggestions?

Best regards,

Allen Zhao


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