No children
gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge Intel C++ compatibility fixes to branch 1.1
0 7 0
merge 1.1
3 files changed with 37 insertions and 6 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -57,35 +57,35 @@
57 57
  ELSEIF(MSVC)
58 58
    # This part is unnecessary 'casue the same is set by the lemon/core.h.
59 59
    # Still keep it as an example.
60 60
    SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
61 61
    # Suppressed warnings:
62 62
    # C4250: 'class1' : inherits 'class2::member' via dominance
63 63
    # C4355: 'this' : used in base member initializer list
64 64
    # C4503: 'function' : decorated name length exceeded, name was truncated
65 65
    # C4800: 'type' : forcing value to bool 'true' or 'false'
66 66
    #        (performance warning)
67 67
    # C4996: 'function': was declared deprecated
68 68
  ELSE()
69
    SET(CXX_WARNING "-Wall -W")
69
    SET(CXX_WARNING "-Wall")
70 70
  ENDIF()
71 71
ENDIF()
72 72
SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
73 73

	
74 74
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
75 75

	
76
SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
76
SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
77 77
    "Flags used by the C++ compiler during maintainer builds."
78 78
    FORCE )
79
SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
79
SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
80 80
    "Flags used by the C compiler during maintainer builds."
81 81
    FORCE )
82 82
SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
83 83
    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
84 84
    "Flags used for linking binaries during maintainer builds."
85 85
    FORCE )
86 86
SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
87 87
    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
88 88
    "Flags used by the shared libraries linker during maintainer builds."
89 89
    FORCE )
90 90
MARK_AS_ADVANCED(
91 91
    CMAKE_CXX_FLAGS_MAINTAINER
Ignore white space 6 line context
... ...
@@ -1238,24 +1238,25 @@
1238 1238
    template <typename _Visitor>
1239 1239
    struct Constraints {
1240 1240
      void constraints() {
1241 1241
        Arc arc;
1242 1242
        Node node;
1243 1243
        visitor.start(node);
1244 1244
        visitor.reach(node);
1245 1245
        visitor.process(node);
1246 1246
        visitor.discover(arc);
1247 1247
        visitor.examine(arc);
1248 1248
      }
1249 1249
      _Visitor& visitor;
1250
      Constraints() {}
1250 1251
    };
1251 1252
  };
1252 1253
#endif
1253 1254

	
1254 1255
  /// \brief Default traits class of BfsVisit class.
1255 1256
  ///
1256 1257
  /// Default traits class of BfsVisit class.
1257 1258
  /// \tparam GR The type of the digraph the algorithm runs on.
1258 1259
  template<class GR>
1259 1260
  struct BfsVisitDefaultTraits {
1260 1261

	
1261 1262
    /// \brief The type of the digraph the algorithm runs on.
Ignore white space 24 line context
... ...
@@ -106,24 +106,25 @@
106 106
          _GraphItem i3 = INVALID;
107 107

	
108 108
          i1 = i2 = i3;
109 109

	
110 110
          bool b;
111 111
          b = (ia == ib) && (ia != ib);
112 112
          b = (ia == INVALID) && (ib != INVALID);
113 113
          b = (ia < ib);
114 114
        }
115 115

	
116 116
        const _GraphItem &ia;
117 117
        const _GraphItem &ib;
118
        Constraints() {}
118 119
      };
119 120
    };
120 121

	
121 122
    /// \brief Base skeleton class for directed graphs.
122 123
    ///
123 124
    /// This class describes the base interface of directed graph types.
124 125
    /// All digraph %concepts have to conform to this class.
125 126
    /// It just provides types for nodes and arcs and functions
126 127
    /// to get the source and the target nodes of arcs.
127 128
    class BaseDigraphComponent {
128 129
    public:
129 130

	
... ...
@@ -165,24 +166,25 @@
165 166
          checkConcept<GraphItem<'n'>, Node>();
166 167
          checkConcept<GraphItem<'a'>, Arc>();
167 168
          {
168 169
            Node n;
169 170
            Arc e(INVALID);
170 171
            n = digraph.source(e);
171 172
            n = digraph.target(e);
172 173
            n = digraph.oppositeNode(n, e);
173 174
          }
174 175
        }
175 176

	
176 177
        const _Digraph& digraph;
178
        Constraints() {}
177 179
      };
178 180
    };
179 181

	
180 182
    /// \brief Base skeleton class for undirected graphs.
181 183
    ///
182 184
    /// This class describes the base interface of undirected graph types.
183 185
    /// All graph %concepts have to conform to this class.
184 186
    /// It extends the interface of \ref BaseDigraphComponent with an
185 187
    /// \c Edge type and functions to get the end nodes of edges,
186 188
    /// to convert from arcs to edges and to get both direction of edges.
187 189
    class BaseGraphComponent : public BaseDigraphComponent {
188 190
    public:
... ...
@@ -281,24 +283,25 @@
281 283
            n = graph.v(ue);
282 284
            e = graph.direct(ue, true);
283 285
            e = graph.direct(ue, false);
284 286
            e = graph.direct(ue, n);
285 287
            e = graph.oppositeArc(e);
286 288
            ue = e;
287 289
            bool d = graph.direction(e);
288 290
            ignore_unused_variable_warning(d);
289 291
          }
290 292
        }
291 293

	
292 294
        const _Graph& graph;
295
      Constraints() {}
293 296
      };
294 297

	
295 298
    };
296 299

	
297 300
    /// \brief Skeleton class for \e idable directed graphs.
298 301
    ///
299 302
    /// This class describes the interface of \e idable directed graphs.
300 303
    /// It extends \ref BaseDigraphComponent with the core ID functions.
301 304
    /// The ids of the items must be unique and immutable.
302 305
    /// This concept is part of the Digraph concept.
303 306
    template <typename BAS = BaseDigraphComponent>
304 307
    class IDableDigraphComponent : public BAS {
... ...
@@ -360,24 +363,25 @@
360 363
          arc=INVALID;
361 364
          int eid = digraph.id(arc);
362 365
          eid = digraph.id(arc);
363 366
          arc = digraph.arcFromId(eid);
364 367

	
365 368
          nid = digraph.maxNodeId();
366 369
          ignore_unused_variable_warning(nid);
367 370
          eid = digraph.maxArcId();
368 371
          ignore_unused_variable_warning(eid);
369 372
        }
370 373

	
371 374
        const _Digraph& digraph;
375
        Constraints() {}
372 376
      };
373 377
    };
374 378

	
375 379
    /// \brief Skeleton class for \e idable undirected graphs.
376 380
    ///
377 381
    /// This class describes the interface of \e idable undirected
378 382
    /// graphs. It extends \ref IDableDigraphComponent with the core ID
379 383
    /// functions of undirected graphs.
380 384
    /// The ids of the items must be unique and immutable.
381 385
    /// This concept is part of the Graph concept.
382 386
    template <typename BAS = BaseGraphComponent>
383 387
    class IDableGraphComponent : public IDableDigraphComponent<BAS> {
... ...
@@ -412,24 +416,25 @@
412 416

	
413 417
        void constraints() {
414 418
          checkConcept<IDableDigraphComponent<Base>, _Graph >();
415 419
          typename _Graph::Edge edge;
416 420
          int ueid = graph.id(edge);
417 421
          ueid = graph.id(edge);
418 422
          edge = graph.edgeFromId(ueid);
419 423
          ueid = graph.maxEdgeId();
420 424
          ignore_unused_variable_warning(ueid);
421 425
        }
422 426

	
423 427
        const _Graph& graph;
428
        Constraints() {}
424 429
      };
425 430
    };
426 431

	
427 432
    /// \brief Concept class for \c NodeIt, \c ArcIt and \c EdgeIt types.
428 433
    ///
429 434
    /// This class describes the concept of \c NodeIt, \c ArcIt and
430 435
    /// \c EdgeIt subtypes of digraph and graph types.
431 436
    template <typename GR, typename Item>
432 437
    class GraphItemIt : public Item {
433 438
    public:
434 439
      /// \brief Default constructor.
435 440
      ///
... ...
@@ -489,24 +494,25 @@
489 494
          _GraphItemIt it2;
490 495
          _GraphItemIt it3 = it1;
491 496
          _GraphItemIt it4 = INVALID;
492 497

	
493 498
          it2 = ++it1;
494 499
          ++it2 = it1;
495 500
          ++(++it1);
496 501

	
497 502
          Item bi = it1;
498 503
          bi = it2;
499 504
        }
500 505
        const GR& g;
506
        Constraints() {}
501 507
      };
502 508
    };
503 509

	
504 510
    /// \brief Concept class for \c InArcIt, \c OutArcIt and
505 511
    /// \c IncEdgeIt types.
506 512
    ///
507 513
    /// This class describes the concept of \c InArcIt, \c OutArcIt
508 514
    /// and \c IncEdgeIt subtypes of digraph and graph types.
509 515
    ///
510 516
    /// \note Since these iterator classes do not inherit from the same
511 517
    /// base class, there is an additional template parameter (selector)
512 518
    /// \c sel. For \c InArcIt you should instantiate it with character
... ...
@@ -577,24 +583,25 @@
577 583
          _GraphIncIt it2;
578 584
          _GraphIncIt it3 = it1;
579 585
          _GraphIncIt it4 = INVALID;
580 586

	
581 587
          it2 = ++it1;
582 588
          ++it2 = it1;
583 589
          ++(++it1);
584 590
          Item e = it1;
585 591
          e = it2;
586 592
        }
587 593
        const Base& node;
588 594
        const GR& graph;
595
        Constraints() {}
589 596
      };
590 597
    };
591 598

	
592 599
    /// \brief Skeleton class for iterable directed graphs.
593 600
    ///
594 601
    /// This class describes the interface of iterable directed
595 602
    /// graphs. It extends \ref BaseDigraphComponent with the core
596 603
    /// iterable interface.
597 604
    /// This concept is part of the Digraph concept.
598 605
    template <typename BAS = BaseDigraphComponent>
599 606
    class IterableDigraphComponent : public BAS {
600 607

	
... ...
@@ -753,24 +760,25 @@
753 760
            typename _Digraph::Node n;
754 761
            const typename _Digraph::InArcIt iait(INVALID);
755 762
            const typename _Digraph::OutArcIt oait(INVALID);
756 763
            n = digraph.baseNode(iait);
757 764
            n = digraph.runningNode(iait);
758 765
            n = digraph.baseNode(oait);
759 766
            n = digraph.runningNode(oait);
760 767
            ignore_unused_variable_warning(n);
761 768
          }
762 769
        }
763 770

	
764 771
        const _Digraph& digraph;
772
        Constraints() {}
765 773
      };
766 774
    };
767 775

	
768 776
    /// \brief Skeleton class for iterable undirected graphs.
769 777
    ///
770 778
    /// This class describes the interface of iterable undirected
771 779
    /// graphs. It extends \ref IterableDigraphComponent with the core
772 780
    /// iterable interface of undirected graphs.
773 781
    /// This concept is part of the Graph concept.
774 782
    template <typename BAS = BaseGraphComponent>
775 783
    class IterableGraphComponent : public IterableDigraphComponent<BAS> {
776 784
    public:
... ...
@@ -877,24 +885,25 @@
877 885
              typename _Graph::EdgeIt >();
878 886
            checkConcept<GraphIncIt<_Graph, typename _Graph::Edge,
879 887
              typename _Graph::Node, 'e'>, typename _Graph::IncEdgeIt>();
880 888

	
881 889
            typename _Graph::Node n;
882 890
            const typename _Graph::IncEdgeIt ieit(INVALID);
883 891
            n = graph.baseNode(ieit);
884 892
            n = graph.runningNode(ieit);
885 893
          }
886 894
        }
887 895

	
888 896
        const _Graph& graph;
897
        Constraints() {}
889 898
      };
890 899
    };
891 900

	
892 901
    /// \brief Skeleton class for alterable directed graphs.
893 902
    ///
894 903
    /// This class describes the interface of alterable directed
895 904
    /// graphs. It extends \ref BaseDigraphComponent with the alteration
896 905
    /// notifier interface. It implements
897 906
    /// an observer-notifier pattern for each digraph item. More
898 907
    /// obsevers can be registered into the notifier and whenever an
899 908
    /// alteration occured in the digraph all the observers will be
900 909
    /// notified about it.
... ...
@@ -934,24 +943,25 @@
934 943
          checkConcept<Base, _Digraph>();
935 944
          typename _Digraph::NodeNotifier& nn
936 945
            = digraph.notifier(typename _Digraph::Node());
937 946

	
938 947
          typename _Digraph::ArcNotifier& en
939 948
            = digraph.notifier(typename _Digraph::Arc());
940 949

	
941 950
          ignore_unused_variable_warning(nn);
942 951
          ignore_unused_variable_warning(en);
943 952
        }
944 953

	
945 954
        const _Digraph& digraph;
955
        Constraints() {}
946 956
      };
947 957
    };
948 958

	
949 959
    /// \brief Skeleton class for alterable undirected graphs.
950 960
    ///
951 961
    /// This class describes the interface of alterable undirected
952 962
    /// graphs. It extends \ref AlterableDigraphComponent with the alteration
953 963
    /// notifier interface of undirected graphs. It implements
954 964
    /// an observer-notifier pattern for the edges. More
955 965
    /// obsevers can be registered into the notifier and whenever an
956 966
    /// alteration occured in the graph all the observers will be
957 967
    /// notified about it.
... ...
@@ -975,24 +985,25 @@
975 985
      }
976 986

	
977 987
      template <typename _Graph>
978 988
      struct Constraints {
979 989
        void constraints() {
980 990
          checkConcept<AlterableDigraphComponent<Base>, _Graph>();
981 991
          typename _Graph::EdgeNotifier& uen
982 992
            = graph.notifier(typename _Graph::Edge());
983 993
          ignore_unused_variable_warning(uen);
984 994
        }
985 995

	
986 996
        const _Graph& graph;
997
        Constraints() {}
987 998
      };
988 999
    };
989 1000

	
990 1001
    /// \brief Concept class for standard graph maps.
991 1002
    ///
992 1003
    /// This class describes the concept of standard graph maps, i.e.
993 1004
    /// the \c NodeMap, \c ArcMap and \c EdgeMap subtypes of digraph and
994 1005
    /// graph types, which can be used for associating data to graph items.
995 1006
    /// The standard graph maps must conform to the ReferenceMap concept.
996 1007
    template <typename GR, typename K, typename V>
997 1008
    class GraphMap : public ReferenceMap<K, V, V&, const V&> {
998 1009
      typedef ReferenceMap<K, V, V&, const V&> Parent;
... ...
@@ -1052,24 +1063,25 @@
1052 1063
          // Assignment operator
1053 1064
          // ReadMap<Key, Value> cmap;
1054 1065
          // m3 = cmap;
1055 1066

	
1056 1067
          ignore_unused_variable_warning(m1);
1057 1068
          ignore_unused_variable_warning(m2);
1058 1069
          // ignore_unused_variable_warning(m3);
1059 1070
        }
1060 1071

	
1061 1072
        const _Map &m;
1062 1073
        const GR &g;
1063 1074
        const typename GraphMap::Value &t;
1075
        Constraints() {}
1064 1076
      };
1065 1077

	
1066 1078
    };
1067 1079

	
1068 1080
    /// \brief Skeleton class for mappable directed graphs.
1069 1081
    ///
1070 1082
    /// This class describes the interface of mappable directed graphs.
1071 1083
    /// It extends \ref BaseDigraphComponent with the standard digraph
1072 1084
    /// map classes, namely \c NodeMap and \c ArcMap.
1073 1085
    /// This concept is part of the Digraph concept.
1074 1086
    template <typename BAS = BaseDigraphComponent>
1075 1087
    class MappableDigraphComponent : public BAS  {
... ...
@@ -1190,24 +1202,25 @@
1190 1202
          } { // bool map test
1191 1203
            typedef typename _Digraph::template ArcMap<bool> BoolArcMap;
1192 1204
            checkConcept<GraphMap<_Digraph, typename _Digraph::Arc, bool>,
1193 1205
              BoolArcMap >();
1194 1206
          } { // Dummy map test
1195 1207
            typedef typename _Digraph::template ArcMap<Dummy> DummyArcMap;
1196 1208
            checkConcept<GraphMap<_Digraph, typename _Digraph::Arc, Dummy>,
1197 1209
              DummyArcMap >();
1198 1210
          }
1199 1211
        }
1200 1212

	
1201 1213
        const _Digraph& digraph;
1214
        Constraints() {}
1202 1215
      };
1203 1216
    };
1204 1217

	
1205 1218
    /// \brief Skeleton class for mappable undirected graphs.
1206 1219
    ///
1207 1220
    /// This class describes the interface of mappable undirected graphs.
1208 1221
    /// It extends \ref MappableDigraphComponent with the standard graph
1209 1222
    /// map class for edges (\c EdgeMap).
1210 1223
    /// This concept is part of the Graph concept.
1211 1224
    template <typename BAS = BaseGraphComponent>
1212 1225
    class MappableGraphComponent : public MappableDigraphComponent<BAS>  {
1213 1226
    public:
... ...
@@ -1275,24 +1288,25 @@
1275 1288
          } { // bool map test
1276 1289
            typedef typename _Graph::template EdgeMap<bool> BoolEdgeMap;
1277 1290
            checkConcept<GraphMap<_Graph, typename _Graph::Edge, bool>,
1278 1291
              BoolEdgeMap >();
1279 1292
          } { // Dummy map test
1280 1293
            typedef typename _Graph::template EdgeMap<Dummy> DummyEdgeMap;
1281 1294
            checkConcept<GraphMap<_Graph, typename _Graph::Edge, Dummy>,
1282 1295
              DummyEdgeMap >();
1283 1296
          }
1284 1297
        }
1285 1298

	
1286 1299
        const _Graph& graph;
1300
        Constraints() {}
1287 1301
      };
1288 1302
    };
1289 1303

	
1290 1304
    /// \brief Skeleton class for extendable directed graphs.
1291 1305
    ///
1292 1306
    /// This class describes the interface of extendable directed graphs.
1293 1307
    /// It extends \ref BaseDigraphComponent with functions for adding
1294 1308
    /// nodes and arcs to the digraph.
1295 1309
    /// This concept requires \ref AlterableDigraphComponent.
1296 1310
    template <typename BAS = BaseDigraphComponent>
1297 1311
    class ExtendableDigraphComponent : public BAS {
1298 1312
    public:
... ...
@@ -1319,24 +1333,25 @@
1319 1333
      template <typename _Digraph>
1320 1334
      struct Constraints {
1321 1335
        void constraints() {
1322 1336
          checkConcept<Base, _Digraph>();
1323 1337
          typename _Digraph::Node node_a, node_b;
1324 1338
          node_a = digraph.addNode();
1325 1339
          node_b = digraph.addNode();
1326 1340
          typename _Digraph::Arc arc;
1327 1341
          arc = digraph.addArc(node_a, node_b);
1328 1342
        }
1329 1343

	
1330 1344
        _Digraph& digraph;
1345
        Constraints() {}
1331 1346
      };
1332 1347
    };
1333 1348

	
1334 1349
    /// \brief Skeleton class for extendable undirected graphs.
1335 1350
    ///
1336 1351
    /// This class describes the interface of extendable undirected graphs.
1337 1352
    /// It extends \ref BaseGraphComponent with functions for adding
1338 1353
    /// nodes and edges to the graph.
1339 1354
    /// This concept requires \ref AlterableGraphComponent.
1340 1355
    template <typename BAS = BaseGraphComponent>
1341 1356
    class ExtendableGraphComponent : public BAS {
1342 1357
    public:
... ...
@@ -1363,24 +1378,25 @@
1363 1378
      template <typename _Graph>
1364 1379
      struct Constraints {
1365 1380
        void constraints() {
1366 1381
          checkConcept<Base, _Graph>();
1367 1382
          typename _Graph::Node node_a, node_b;
1368 1383
          node_a = graph.addNode();
1369 1384
          node_b = graph.addNode();
1370 1385
          typename _Graph::Edge edge;
1371 1386
          edge = graph.addEdge(node_a, node_b);
1372 1387
        }
1373 1388

	
1374 1389
        _Graph& graph;
1390
        Constraints() {}
1375 1391
      };
1376 1392
    };
1377 1393

	
1378 1394
    /// \brief Skeleton class for erasable directed graphs.
1379 1395
    ///
1380 1396
    /// This class describes the interface of erasable directed graphs.
1381 1397
    /// It extends \ref BaseDigraphComponent with functions for removing
1382 1398
    /// nodes and arcs from the digraph.
1383 1399
    /// This concept requires \ref AlterableDigraphComponent.
1384 1400
    template <typename BAS = BaseDigraphComponent>
1385 1401
    class ErasableDigraphComponent : public BAS {
1386 1402
    public:
... ...
@@ -1402,24 +1418,25 @@
1402 1418

	
1403 1419
      template <typename _Digraph>
1404 1420
      struct Constraints {
1405 1421
        void constraints() {
1406 1422
          checkConcept<Base, _Digraph>();
1407 1423
          const typename _Digraph::Node node(INVALID);
1408 1424
          digraph.erase(node);
1409 1425
          const typename _Digraph::Arc arc(INVALID);
1410 1426
          digraph.erase(arc);
1411 1427
        }
1412 1428

	
1413 1429
        _Digraph& digraph;
1430
        Constraints() {}
1414 1431
      };
1415 1432
    };
1416 1433

	
1417 1434
    /// \brief Skeleton class for erasable undirected graphs.
1418 1435
    ///
1419 1436
    /// This class describes the interface of erasable undirected graphs.
1420 1437
    /// It extends \ref BaseGraphComponent with functions for removing
1421 1438
    /// nodes and edges from the graph.
1422 1439
    /// This concept requires \ref AlterableGraphComponent.
1423 1440
    template <typename BAS = BaseGraphComponent>
1424 1441
    class ErasableGraphComponent : public BAS {
1425 1442
    public:
... ...
@@ -1441,24 +1458,25 @@
1441 1458

	
1442 1459
      template <typename _Graph>
1443 1460
      struct Constraints {
1444 1461
        void constraints() {
1445 1462
          checkConcept<Base, _Graph>();
1446 1463
          const typename _Graph::Node node(INVALID);
1447 1464
          graph.erase(node);
1448 1465
          const typename _Graph::Edge edge(INVALID);
1449 1466
          graph.erase(edge);
1450 1467
        }
1451 1468

	
1452 1469
        _Graph& graph;
1470
        Constraints() {}
1453 1471
      };
1454 1472
    };
1455 1473

	
1456 1474
    /// \brief Skeleton class for clearable directed graphs.
1457 1475
    ///
1458 1476
    /// This class describes the interface of clearable directed graphs.
1459 1477
    /// It extends \ref BaseDigraphComponent with a function for clearing
1460 1478
    /// the digraph.
1461 1479
    /// This concept requires \ref AlterableDigraphComponent.
1462 1480
    template <typename BAS = BaseDigraphComponent>
1463 1481
    class ClearableDigraphComponent : public BAS {
1464 1482
    public:
... ...
@@ -1469,24 +1487,25 @@
1469 1487
      ///
1470 1488
      /// This function erases all nodes and arcs from the digraph.
1471 1489
      void clear() {}
1472 1490

	
1473 1491
      template <typename _Digraph>
1474 1492
      struct Constraints {
1475 1493
        void constraints() {
1476 1494
          checkConcept<Base, _Digraph>();
1477 1495
          digraph.clear();
1478 1496
        }
1479 1497

	
1480 1498
        _Digraph& digraph;
1499
        Constraints() {}
1481 1500
      };
1482 1501
    };
1483 1502

	
1484 1503
    /// \brief Skeleton class for clearable undirected graphs.
1485 1504
    ///
1486 1505
    /// This class describes the interface of clearable undirected graphs.
1487 1506
    /// It extends \ref BaseGraphComponent with a function for clearing
1488 1507
    /// the graph.
1489 1508
    /// This concept requires \ref AlterableGraphComponent.
1490 1509
    template <typename BAS = BaseGraphComponent>
1491 1510
    class ClearableGraphComponent : public ClearableDigraphComponent<BAS> {
1492 1511
    public:
... ...
@@ -1497,20 +1516,21 @@
1497 1516
      ///
1498 1517
      /// This function erases all nodes and edges from the graph.
1499 1518
      void clear() {}
1500 1519

	
1501 1520
      template <typename _Graph>
1502 1521
      struct Constraints {
1503 1522
        void constraints() {
1504 1523
          checkConcept<Base, _Graph>();
1505 1524
          graph.clear();
1506 1525
        }
1507 1526

	
1508 1527
        _Graph& graph;
1528
        Constraints() {}
1509 1529
      };
1510 1530
    };
1511 1531

	
1512 1532
  }
1513 1533

	
1514 1534
}
1515 1535

	
1516 1536
#endif
Ignore white space 6 line context
... ...
@@ -243,19 +243,20 @@
243 243
          heap.clear();
244 244

	
245 245
          own_state = heap.state(own_item);
246 246
          heap.state(own_item, own_state);
247 247

	
248 248
          own_state = _Heap::PRE_HEAP;
249 249
          own_state = _Heap::IN_HEAP;
250 250
          own_state = _Heap::POST_HEAP;
251 251
        }
252 252

	
253 253
        _Heap& heap;
254 254
        ItemIntMap& map;
255
        Constraints() {}
255 256
      };
256 257
    };
257 258

	
258 259
    /// @}
259 260
  } // namespace lemon
260 261
}
261 262
#endif
Ignore white space 6 line context
... ...
@@ -59,24 +59,25 @@
59 59
          val = m[key];
60 60
          typename _ReadMap::Value own_val = m[own_key];
61 61
          own_val = m[own_key];
62 62

	
63 63
          ignore_unused_variable_warning(key);
64 64
          ignore_unused_variable_warning(val);
65 65
          ignore_unused_variable_warning(own_key);
66 66
          ignore_unused_variable_warning(own_val);
67 67
        }
68 68
        const Key& key;
69 69
        const typename _ReadMap::Key& own_key;
70 70
        const _ReadMap& m;
71
        Constraints() {}
71 72
      };
72 73

	
73 74
    };
74 75

	
75 76

	
76 77
    /// Writable map concept
77 78

	
78 79
    /// Writable map concept.
79 80
    ///
80 81
    template<typename K, typename T>
81 82
    class WriteMap
82 83
    {
... ...
@@ -100,45 +101,47 @@
100 101
          m.set(own_key, own_val);
101 102

	
102 103
          ignore_unused_variable_warning(key);
103 104
          ignore_unused_variable_warning(val);
104 105
          ignore_unused_variable_warning(own_key);
105 106
          ignore_unused_variable_warning(own_val);
106 107
        }
107 108
        const Key& key;
108 109
        const Value& val;
109 110
        const typename _WriteMap::Key& own_key;
110 111
        const typename _WriteMap::Value& own_val;
111 112
        _WriteMap& m;
113
        Constraints() {}
112 114
      };
113 115
    };
114 116

	
115 117
    /// Read/writable map concept
116 118

	
117 119
    /// Read/writable map concept.
118 120
    ///
119 121
    template<typename K, typename T>
120 122
    class ReadWriteMap : public ReadMap<K,T>,
121 123
                         public WriteMap<K,T>
122 124
    {
123 125
    public:
124 126
      /// The key type of the map.
125 127
      typedef K Key;
126 128
      /// \brief The value type of the map.
127 129
      /// (The type of objects associated with the keys).
128 130
      typedef T Value;
129 131

	
130 132
      /// Returns the value associated with the given key.
131 133
      Value operator[](const Key &) const {
132
        return *static_cast<Value *>(0);
134
        Value *r = 0;
135
        return *r;
133 136
      }
134 137

	
135 138
      /// Sets the value associated with the given key.
136 139
      void set(const Key &, const Value &) {}
137 140

	
138 141
      template<typename _ReadWriteMap>
139 142
      struct Constraints {
140 143
        void constraints() {
141 144
          checkConcept<ReadMap<K, T>, _ReadWriteMap >();
142 145
          checkConcept<WriteMap<K, T>, _ReadWriteMap >();
143 146
        }
144 147
      };
... ...
@@ -160,30 +163,32 @@
160 163
      /// \brief The value type of the map.
161 164
      /// (The type of objects associated with the keys).
162 165
      typedef T Value;
163 166
      /// The reference type of the map.
164 167
      typedef R Reference;
165 168
      /// The const reference type of the map.
166 169
      typedef CR ConstReference;
167 170

	
168 171
    public:
169 172

	
170 173
      /// Returns a reference to the value associated with the given key.
171 174
      Reference operator[](const Key &) {
172
        return *static_cast<Value *>(0);
175
        Value *r = 0;
176
        return *r;
173 177
      }
174 178

	
175 179
      /// Returns a const reference to the value associated with the given key.
176 180
      ConstReference operator[](const Key &) const {
177
        return *static_cast<Value *>(0);
181
        Value *r = 0;
182
        return *r;
178 183
      }
179 184

	
180 185
      /// Sets the value associated with the given key.
181 186
      void set(const Key &k,const Value &t) { operator[](k)=t; }
182 187

	
183 188
      template<typename _ReferenceMap>
184 189
      struct Constraints {
185 190
        typename enable_if<typename _ReferenceMap::ReferenceMapTag, void>::type
186 191
        constraints() {
187 192
          checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
188 193
          ref = m[key];
189 194
          m[key] = val;
... ...
@@ -196,22 +201,23 @@
196 201
          m[key] = m[own_key];
197 202
          m[own_key] = m[key];
198 203
        }
199 204
        const Key& key;
200 205
        Value& val;
201 206
        Reference ref;
202 207
        ConstReference cref;
203 208
        const typename _ReferenceMap::Key& own_key;
204 209
        typename _ReferenceMap::Value& own_val;
205 210
        typename _ReferenceMap::Reference own_ref;
206 211
        typename _ReferenceMap::ConstReference own_cref;
207 212
        _ReferenceMap& m;
213
        Constraints() {}
208 214
      };
209 215
    };
210 216

	
211 217
    // @}
212 218

	
213 219
  } //namespace concepts
214 220

	
215 221
} //namespace lemon
216 222

	
217 223
#endif
Ignore white space 6 line context
... ...
@@ -150,24 +150,25 @@
150 150
          ++i;
151 151
          typename _Digraph::Arc ed = i;
152 152

	
153 153
          e = (i == INVALID);
154 154
          e = (i != INVALID);
155 155

	
156 156
          ignore_unused_variable_warning(l);
157 157
          ignore_unused_variable_warning(e);
158 158
          ignore_unused_variable_warning(id);
159 159
          ignore_unused_variable_warning(ed);
160 160
        }
161 161
        _Path& p;
162
        PathDumperConstraints() {}
162 163
      };
163 164

	
164 165
      template <typename _Digraph, typename _Path>
165 166
      struct PathDumperConstraints<
166 167
        _Digraph, _Path,
167 168
        typename enable_if<typename _Path::RevPathTag, void>::type
168 169
      > {
169 170
        void constraints() {
170 171
          int l = p.length();
171 172
          int e = p.empty();
172 173

	
173 174
          typename _Path::RevArcIt id, i(p);
... ...
@@ -175,24 +176,25 @@
175 176
          ++i;
176 177
          typename _Digraph::Arc ed = i;
177 178

	
178 179
          e = (i == INVALID);
179 180
          e = (i != INVALID);
180 181

	
181 182
          ignore_unused_variable_warning(l);
182 183
          ignore_unused_variable_warning(e);
183 184
          ignore_unused_variable_warning(id);
184 185
          ignore_unused_variable_warning(ed);
185 186
        }
186 187
        _Path& p;
188
        PathDumperConstraints() {}
187 189
      };
188 190

	
189 191
    }
190 192

	
191 193

	
192 194
    /// \brief A skeleton structure for path dumpers.
193 195
    ///
194 196
    /// A skeleton structure for path dumpers. The path dumpers are
195 197
    /// the generalization of the paths. The path dumpers can
196 198
    /// enumerate the arcs of the path wheter in forward or in
197 199
    /// backward order.  In most time these classes are not used
198 200
    /// directly rather it used to assign a dumped class to a real
Ignore white space 6 line context
... ...
@@ -1182,24 +1182,25 @@
1182 1182
      void constraints() {
1183 1183
        Arc arc;
1184 1184
        Node node;
1185 1185
        visitor.start(node);
1186 1186
        visitor.stop(arc);
1187 1187
        visitor.reach(node);
1188 1188
        visitor.discover(arc);
1189 1189
        visitor.examine(arc);
1190 1190
        visitor.leave(node);
1191 1191
        visitor.backtrack(arc);
1192 1192
      }
1193 1193
      _Visitor& visitor;
1194
      Constraints() {}
1194 1195
    };
1195 1196
  };
1196 1197
#endif
1197 1198

	
1198 1199
  /// \brief Default traits class of DfsVisit class.
1199 1200
  ///
1200 1201
  /// Default traits class of DfsVisit class.
1201 1202
  /// \tparam _Digraph The type of the digraph the algorithm runs on.
1202 1203
  template<class GR>
1203 1204
  struct DfsVisitDefaultTraits {
1204 1205

	
1205 1206
    /// \brief The type of the digraph the algorithm runs on.
0 comments (0 inline)