COIN-OR::LEMON - Graph Library

Changeset 1705:3f63d9db307b in lemon-0.x for lemon/utility.h


Ignore:
Timestamp:
10/05/05 15:18:51 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2232
Message:

Removing smart references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/utility.h

    r1696 r1705  
    140140  struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
    141141
    142   // smart referencing
    143 
    144   template <typename _Type, typename Enable = void>
    145   struct SmartReference {
    146     typedef _Type& Type;
    147   };
    148  
    149   template <typename _Type>
    150   struct SmartReference<
    151     _Type,
    152     typename enable_if<typename _Type::NeedCopy, void>::type
    153   > {
    154     typedef _Type Type;
    155   };
    156 
    157   template <typename _Type, typename Enable = void>
    158   struct SmartConstReference {
    159     typedef const _Type& Type;
    160   };
    161  
    162   template <typename _Type>
    163   struct SmartConstReference<
    164     _Type,
    165     typename enable_if<typename _Type::NeedCopy, void>::type
    166   > {
    167     typedef const _Type Type;
    168   };
    169 
    170   template <typename _Type, typename Enable = void>
    171   struct SmartParameter {
    172     typedef _Type& Type;
    173   };
    174  
    175   template <typename _Type>
    176   struct SmartParameter<
    177     _Type,
    178     typename enable_if<typename _Type::NeedCopy, void>::type
    179   > {
    180     typedef const _Type& Type;
    181   };
    182 
    183142} // namespace lemon
    184143
Note: See TracChangeset for help on using the changeset viewer.