COIN-OR::LEMON - Graph Library

Ticket #365: windows_h_fix_1.2.patch

File windows_h_fix_1.2.patch, 4.0 KB (added by Akos Ladanyi, 15 years ago)

a85009634531

  • lemon/adaptors.h

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1271337472 -3600
    # Branch 1.2
    # Node ID a850096345318a304d7f9af3268f6952eac831a1
    # Parent  e26ad33d1fbc57e91d9ec58caebe40fe2b43d298
    Rename types conflicting with names in windows.h (#365)
    
    diff --git a/lemon/adaptors.h b/lemon/adaptors.h
    a b  
    34463446    ///
    34473447    /// This map adaptor class adapts two node maps of the original digraph
    34483448    /// to get a node map of the split digraph.
    3449     /// Its value type is inherited from the first node map type (\c IN).
    3450     /// \tparam IN The type of the node map for the in-nodes.
    3451     /// \tparam OUT The type of the node map for the out-nodes.
    3452     template <typename IN, typename OUT>
     3449    /// Its value type is inherited from the first node map type (\c IM).
     3450    /// \tparam IM The type of the node map for the in-nodes.
     3451    /// \tparam OM The type of the node map for the out-nodes.
     3452    template <typename IM, typename OM>
    34533453    class CombinedNodeMap {
    34543454    public:
    34553455
    34563456      /// The key type of the map
    34573457      typedef Node Key;
    34583458      /// The value type of the map
    3459       typedef typename IN::Value Value;
    3460 
    3461       typedef typename MapTraits<IN>::ReferenceMapTag ReferenceMapTag;
    3462       typedef typename MapTraits<IN>::ReturnValue ReturnValue;
    3463       typedef typename MapTraits<IN>::ConstReturnValue ConstReturnValue;
    3464       typedef typename MapTraits<IN>::ReturnValue Reference;
    3465       typedef typename MapTraits<IN>::ConstReturnValue ConstReference;
     3459      typedef typename IM::Value Value;
     3460
     3461      typedef typename MapTraits<IM>::ReferenceMapTag ReferenceMapTag;
     3462      typedef typename MapTraits<IM>::ReturnValue ReturnValue;
     3463      typedef typename MapTraits<IM>::ConstReturnValue ConstReturnValue;
     3464      typedef typename MapTraits<IM>::ReturnValue Reference;
     3465      typedef typename MapTraits<IM>::ConstReturnValue ConstReference;
    34663466
    34673467      /// Constructor
    3468       CombinedNodeMap(IN& in_map, OUT& out_map)
     3468      CombinedNodeMap(IM& in_map, OM& out_map)
    34693469        : _in_map(in_map), _out_map(out_map) {}
    34703470
    34713471      /// Returns the value associated with the given key.
     
    34973497
    34983498    private:
    34993499
    3500       IN& _in_map;
    3501       OUT& _out_map;
     3500      IM& _in_map;
     3501      OM& _out_map;
    35023502
    35033503    };
    35043504
     
    35063506    /// \brief Returns a combined node map
    35073507    ///
    35083508    /// This function just returns a combined node map.
    3509     template <typename IN, typename OUT>
    3510     static CombinedNodeMap<IN, OUT>
    3511     combinedNodeMap(IN& in_map, OUT& out_map) {
    3512       return CombinedNodeMap<IN, OUT>(in_map, out_map);
     3509    template <typename IM, typename OM>
     3510    static CombinedNodeMap<IM, OM>
     3511    combinedNodeMap(IM& in_map, OM& out_map) {
     3512      return CombinedNodeMap<IM, OM>(in_map, out_map);
    35133513    }
    35143514
    3515     template <typename IN, typename OUT>
    3516     static CombinedNodeMap<const IN, OUT>
    3517     combinedNodeMap(const IN& in_map, OUT& out_map) {
    3518       return CombinedNodeMap<const IN, OUT>(in_map, out_map);
     3515    template <typename IM, typename OM>
     3516    static CombinedNodeMap<const IM, OM>
     3517    combinedNodeMap(const IM& in_map, OM& out_map) {
     3518      return CombinedNodeMap<const IM, OM>(in_map, out_map);
    35193519    }
    35203520
    3521     template <typename IN, typename OUT>
    3522     static CombinedNodeMap<IN, const OUT>
    3523     combinedNodeMap(IN& in_map, const OUT& out_map) {
    3524       return CombinedNodeMap<IN, const OUT>(in_map, out_map);
     3521    template <typename IM, typename OM>
     3522    static CombinedNodeMap<IM, const OM>
     3523    combinedNodeMap(IM& in_map, const OM& out_map) {
     3524      return CombinedNodeMap<IM, const OM>(in_map, out_map);
    35253525    }
    35263526
    3527     template <typename IN, typename OUT>
    3528     static CombinedNodeMap<const IN, const OUT>
    3529     combinedNodeMap(const IN& in_map, const OUT& out_map) {
    3530       return CombinedNodeMap<const IN, const OUT>(in_map, out_map);
     3527    template <typename IM, typename OM>
     3528    static CombinedNodeMap<const IM, const OM>
     3529    combinedNodeMap(const IM& in_map, const OM& out_map) {
     3530      return CombinedNodeMap<const IM, const OM>(in_map, out_map);
    35313531    }
    35323532
    35333533    /// \brief Arc map combined from an arc map and a node map of the