Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-09 20:01:19


Can someone explain the existence of the following in call_traits.hpp, and
how such code came to be accepted into a release library?

Thanks,
Dave

-------

#if 0
template <typename T, std::size_t N>
struct call_traits<T [N]>
{
   typedef T* const value_type; // hh was typedef T
value_type[N];
   typedef T (&reference)[N]; // hh was typedef T*& reference;
   typedef const T (&const_reference)[N]; // hh was typedef const T*&
const_reference;
   typedef value_type param_type; // hh was typedef T* param_type;
};
#elif 0
template <typename T, std::size_t N>
struct call_traits<T [N]>
{
private:
   typedef T array_type[N];
public:
   typedef array_type& value_type;
   typedef value_type reference;
   typedef const array_type& const_reference;
   typedef value_type param_type;
};
#else
template <typename T, std::size_t N>
struct call_traits<T [N]>
{
   typedef T*const value_type;
   typedef T*const reference;
   typedef const T*const const_reference;
   typedef value_type param_type;
};
#endif


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk