COIN-OR::LEMON - Graph Library

Ticket #365: windows_h_fix_1.1.patch

File windows_h_fix_1.1.patch, 4.0 KB (added by Akos Ladanyi, 14 years ago)

b265952526f2

  • lemon/adaptors.h

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1271337914 -3600
    # Branch 1.1
    # Node ID b265952526f2e1de91291b5d900b7424837a2e03
    # Parent  290f3ca599d693626ca7d1fcd718e1562573f3c9
    Rename types conflicting with names in windows.h (#365)
    
    diff --git a/lemon/adaptors.h b/lemon/adaptors.h
    a b  
    34223422    ///
    34233423    /// This map adaptor class adapts two node maps of the original digraph
    34243424    /// to get a node map of the split digraph.
    3425     /// Its value type is inherited from the first node map type (\c IN).
    3426     /// \tparam IN The type of the node map for the in-nodes.
    3427     /// \tparam OUT The type of the node map for the out-nodes.
    3428     template <typename IN, typename OUT>
     3425    /// Its value type is inherited from the first node map type (\c IM).
     3426    /// \tparam IM The type of the node map for the in-nodes.
     3427    /// \tparam OM The type of the node map for the out-nodes.
     3428    template <typename IM, typename OM>
    34293429    class CombinedNodeMap {
    34303430    public:
    34313431
    34323432      /// The key type of the map
    34333433      typedef Node Key;
    34343434      /// The value type of the map
    3435       typedef typename IN::Value Value;
    3436 
    3437       typedef typename MapTraits<IN>::ReferenceMapTag ReferenceMapTag;
    3438       typedef typename MapTraits<IN>::ReturnValue ReturnValue;
    3439       typedef typename MapTraits<IN>::ConstReturnValue ConstReturnValue;
    3440       typedef typename MapTraits<IN>::ReturnValue Reference;
    3441       typedef typename MapTraits<IN>::ConstReturnValue ConstReference;
     3435      typedef typename IM::Value Value;
     3436
     3437      typedef typename MapTraits<IM>::ReferenceMapTag ReferenceMapTag;
     3438      typedef typename MapTraits<IM>::ReturnValue ReturnValue;
     3439      typedef typename MapTraits<IM>::ConstReturnValue ConstReturnValue;
     3440      typedef typename MapTraits<IM>::ReturnValue Reference;
     3441      typedef typename MapTraits<IM>::ConstReturnValue ConstReference;
    34423442
    34433443      /// Constructor
    3444       CombinedNodeMap(IN& in_map, OUT& out_map)
     3444      CombinedNodeMap(IM& in_map, OM& out_map)
    34453445        : _in_map(in_map), _out_map(out_map) {}
    34463446
    34473447      /// Returns the value associated with the given key.
     
    34733473
    34743474    private:
    34753475
    3476       IN& _in_map;
    3477       OUT& _out_map;
     3476      IM& _in_map;
     3477      OM& _out_map;
    34783478
    34793479    };
    34803480
     
    34823482    /// \brief Returns a combined node map
    34833483    ///
    34843484    /// This function just returns a combined node map.
    3485     template <typename IN, typename OUT>
    3486     static CombinedNodeMap<IN, OUT>
    3487     combinedNodeMap(IN& in_map, OUT& out_map) {
    3488       return CombinedNodeMap<IN, OUT>(in_map, out_map);
     3485    template <typename IM, typename OM>
     3486    static CombinedNodeMap<IM, OM>
     3487    combinedNodeMap(IM& in_map, OM& out_map) {
     3488      return CombinedNodeMap<IM, OM>(in_map, out_map);
    34893489    }
    34903490
    3491     template <typename IN, typename OUT>
    3492     static CombinedNodeMap<const IN, OUT>
    3493     combinedNodeMap(const IN& in_map, OUT& out_map) {
    3494       return CombinedNodeMap<const IN, OUT>(in_map, out_map);
     3491    template <typename IM, typename OM>
     3492    static CombinedNodeMap<const IM, OM>
     3493    combinedNodeMap(const IM& in_map, OM& out_map) {
     3494      return CombinedNodeMap<const IM, OM>(in_map, out_map);
    34953495    }
    34963496
    3497     template <typename IN, typename OUT>
    3498     static CombinedNodeMap<IN, const OUT>
    3499     combinedNodeMap(IN& in_map, const OUT& out_map) {
    3500       return CombinedNodeMap<IN, const OUT>(in_map, out_map);
     3497    template <typename IM, typename OM>
     3498    static CombinedNodeMap<IM, const OM>
     3499    combinedNodeMap(IM& in_map, const OM& out_map) {
     3500      return CombinedNodeMap<IM, const OM>(in_map, out_map);
    35013501    }
    35023502
    3503     template <typename IN, typename OUT>
    3504     static CombinedNodeMap<const IN, const OUT>
    3505     combinedNodeMap(const IN& in_map, const OUT& out_map) {
    3506       return CombinedNodeMap<const IN, const OUT>(in_map, out_map);
     3503    template <typename IM, typename OM>
     3504    static CombinedNodeMap<const IM, const OM>
     3505    combinedNodeMap(const IM& in_map, const OM& out_map) {
     3506      return CombinedNodeMap<const IM, const OM>(in_map, out_map);
    35073507    }
    35083508
    35093509    /// \brief Arc map combined from an arc map and a node map of the