Changeset 1591 for trunk/yat/utility


Ignore:
Timestamp:
Oct 17, 2008, 10:11:26 PM (13 years ago)
Author:
Peter
Message:

fixes #447

Moved some (internal) functions and clases to namespace
theplu::yat::utility::detail. Did not move the stuff to another file
though, because unexpected problems with cyclic dependency.

Currently the namespace theplu::yat::utility::detail is not documented
(doc/namespace.doxygen), which implies that functionality is excluded
from documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/iterator_traits.h

    r1565 r1591  
    4747
    4848
     49namespace detail {
    4950  /**
    5051     \internal
     
    7273    typedef weighted_iterator_tag type;
    7374  }; 
     75} // namespace detail
     76
    7477
    7578  /**
     
    8891       \return weighted if value_type is DataWeight
    8992     */
    90     typedef typename weighted_iterator_traits_detail<value>::type type;
    91   };
    92 
    93 
     93    typedef typename detail::weighted_iterator_traits_detail<value>::type type;
     94  };
     95
     96
     97namespace detail {
    9498  /**
    9599     \internal
     
    120124    typedef unweighted_iterator_tag type;
    121125  };
     126} // namespace detail
    122127
    123128  /**
     
    133138  public:
    134139    /// return unweighted if both are unweighted
    135     typedef typename unweighted_type_and<w_type1, w_type2>::type type;
     140    typedef typename detail::unweighted_type_and<w_type1, w_type2>::type type;
    136141  };
    137142
     
    146151  public:
    147152    /// return unweighted if all are unweighted
    148     typedef typename unweighted_type_and<tmp, w_type3>::type type;
    149   };
    150 
    151   /// check (at compile time) that iterator is unweighted.
    152   inline void check_iterator_is_unweighted(unweighted_iterator_tag x){}
    153 
    154   /**
    155      check (at compile time) that iterator \a iter is unweighted. This
    156      function is strictly not needed, but exists only for convenience.
     153    typedef typename detail::unweighted_type_and<tmp, w_type3>::type type;
     154  };
     155
     156  namespace detail {
     157    /// check (at compile time) that iterator is unweighted.
     158    inline void
     159    check_iterator_is_unweighted(utility::unweighted_iterator_tag x){}
     160  } // namespace detail
     161
     162  /**
     163     \brief check (at compile time) that iterator is unweighted.
     164
     165     This function only compiles if iterator \a iter is unweighted.
    157166   */
    158167  template <class Iter>
    159168  void check_iterator_is_unweighted(Iter iter)
    160   { check_iterator_is_unweighted(typename
     169  { detail::check_iterator_is_unweighted(typename
    161170                                 weighted_iterator_traits<Iter>::type());
    162171  }
    163172
    164173
     174namespace detail {
    165175  /**
    166176     \internal
     
    283293    weight_reference weight(Iter iter) const { return (*iter).weight(); }
    284294  };
    285 
     295} // namespace detail
    286296
    287297  /**
     
    305315  private:
    306316    typedef typename std::iterator_traits<Iter>::reference reference;
    307     typedef iterator_traits_detail<Iter, reference> traits;
     317    typedef detail::iterator_traits_detail<Iter, reference> traits;
    308318  public:
    309319    /**
Note: See TracChangeset for help on using the changeset viewer.