diff --git a/lemon/path.h b/lemon/path.h --- a/lemon/path.h +++ b/lemon/path.h @@ -903,20 +903,34 @@ namespace _path_bits { template - struct RevTagIndicator { + struct RevPathTagIndicator { static const bool value = false; }; - template - struct RevTagIndicator< - Digraph, - typename enable_if::type + template + struct RevPathTagIndicator< + Path, + typename enable_if::type + > { + static const bool value = true; + }; + + template + struct BuildTagIndicator { + static const bool value = false; + }; + + template + struct BuildTagIndicator< + Path, + typename enable_if::type > { static const bool value = true; }; template + bool buildEnable = BuildTagIndicator::value, + bool revEnable = RevPathTagIndicator::value> struct PathCopySelector { static void copy(Target& target, const Source& source) { target.clear(); @@ -926,10 +940,8 @@ } }; - template - struct PathCopySelector< - Target, Source, BuildEnable, - typename enable_if::type> { + template + struct PathCopySelector { static void copy(Target& target, const Source& source) { target.clear(); for (typename Source::RevArcIt it(source); it != INVALID; ++it) { @@ -938,10 +950,8 @@ } }; - template - struct PathCopySelector< - Target, Source, - typename enable_if::type, RevEnable> { + template + struct PathCopySelector { static void copy(Target& target, const Source& source) { target.clear(); target.build(source); @@ -949,10 +959,7 @@ }; template - struct PathCopySelector< - Target, Source, - typename enable_if::type, - typename enable_if::type> { + struct PathCopySelector { static void copy(Target& target, const Source& source) { target.clear(); target.buildRev(source);