diff -r 53c2a0ccc9a4 -r afaa773d0ad0 src/lemon/utility.h --- a/src/lemon/utility.h Sat May 14 17:29:28 2005 +0000 +++ b/src/lemon/utility.h Sat May 14 17:32:11 2005 +0000 @@ -107,6 +107,47 @@ template struct lazy_disable_if : public lazy_disable_if_c {}; + // smart referencing + + template + struct SmartReference { + typedef _Type& Type; + }; + + template + struct SmartReference< + _Type, + typename enable_if::type + > { + typedef _Type Type; + }; + + template + struct SmartConstReference { + typedef const _Type& Type; + }; + + template + struct SmartConstReference< + _Type, + typename enable_if::type + > { + typedef const _Type Type; + }; + + template + struct SmartParameter { + typedef _Type& Type; + }; + + template + struct SmartParameter< + _Type, + typename enable_if::type + > { + typedef const _Type& Type; + }; + } // namespace lemon #endif