gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge Intel C++ compatibility fixes
0 7 0
merge default
6 files changed with 37 insertions and 6 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -61,27 +61,27 @@
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
Ignore white space 6 line context
... ...
@@ -1246,16 +1246,17 @@
1246 1246
        Node node;
1247 1247
        visitor.start(node);
1248 1248
        visitor.reach(node);
1249 1249
        visitor.process(node);
1250 1250
        visitor.discover(arc);
1251 1251
        visitor.examine(arc);
1252 1252
      }
1253 1253
      _Visitor& visitor;
1254
      Constraints() {}
1254 1255
    };
1255 1256
  };
1256 1257
#endif
1257 1258

	
1258 1259
  /// \brief Default traits class of BfsVisit class.
1259 1260
  ///
1260 1261
  /// Default traits class of BfsVisit class.
1261 1262
  /// \tparam GR The type of the digraph the algorithm runs on.
Ignore white space 6 line context
... ...
@@ -110,16 +110,17 @@
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
... ...
@@ -169,16 +170,17 @@
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
... ...
@@ -285,16 +287,17 @@
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.
... ...
@@ -364,16 +367,17 @@
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.
... ...
@@ -416,16 +420,17 @@
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>
... ...
@@ -493,16 +498,17 @@
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.
... ...
@@ -581,16 +587,17 @@
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.
... ...
@@ -757,16 +764,17 @@
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.
... ...
@@ -881,16 +889,17 @@
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
... ...
@@ -938,16 +947,17 @@
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
... ...
@@ -979,16 +989,17 @@
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.
... ...
@@ -1056,16 +1067,17 @@
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
... ...
@@ -1194,16 +1206,17 @@
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).
... ...
@@ -1279,16 +1292,17 @@
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.
... ...
@@ -1323,16 +1337,17 @@
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.
... ...
@@ -1367,16 +1382,17 @@
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.
... ...
@@ -1406,16 +1422,17 @@
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.
... ...
@@ -1445,16 +1462,17 @@
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.
... ...
@@ -1473,16 +1491,17 @@
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.
... ...
@@ -1501,16 +1520,17 @@
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
... ...
@@ -309,15 +309,16 @@
309 309

	
310 310
          own_state = _Heap::PRE_HEAP;
311 311
          own_state = _Heap::IN_HEAP;
312 312
          own_state = _Heap::POST_HEAP;
313 313
        }
314 314

	
315 315
        _Heap& heap;
316 316
        ItemIntMap& map;
317
        Constraints() {}
317 318
      };
318 319
    };
319 320

	
320 321
    /// @}
321 322
  } // namespace lemon
322 323
}
323 324
#endif
Ignore white space 6 line context
... ...
@@ -63,16 +63,17 @@
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.
... ...
@@ -104,16 +105,17 @@
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>
... ...
@@ -124,17 +126,18 @@
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() {
... ...
@@ -164,22 +167,24 @@
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
... ...
@@ -200,16 +205,17 @@
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
Ignore white space 16 line context
... ...
@@ -163,16 +163,17 @@
163 163
          e = (i != INVALID);
164 164

	
165 165
          ignore_unused_variable_warning(l);
166 166
          ignore_unused_variable_warning(e);
167 167
          ignore_unused_variable_warning(id);
168 168
          ignore_unused_variable_warning(ed);
169 169
        }
170 170
        _Path& p;
171
        PathDumperConstraints() {}
171 172
      };
172 173

	
173 174
      template <typename _Digraph, typename _Path>
174 175
      struct PathDumperConstraints<
175 176
        _Digraph, _Path,
176 177
        typename enable_if<typename _Path::RevPathTag, void>::type
177 178
      > {
178 179
        void constraints() {
... ...
@@ -188,16 +189,17 @@
188 189
          e = (i != INVALID);
189 190

	
190 191
          ignore_unused_variable_warning(l);
191 192
          ignore_unused_variable_warning(e);
192 193
          ignore_unused_variable_warning(id);
193 194
          ignore_unused_variable_warning(ed);
194 195
        }
195 196
        _Path& p;
197
        PathDumperConstraints() {}
196 198
      };
197 199

	
198 200
    }
199 201

	
200 202

	
201 203
    /// \brief A skeleton structure for path dumpers.
202 204
    ///
203 205
    /// A skeleton structure for path dumpers. The path dumpers are
Ignore white space 6 line context
... ...
@@ -1188,16 +1188,17 @@
1188 1188
        visitor.stop(arc);
1189 1189
        visitor.reach(node);
1190 1190
        visitor.discover(arc);
1191 1191
        visitor.examine(arc);
1192 1192
        visitor.leave(node);
1193 1193
        visitor.backtrack(arc);
1194 1194
      }
1195 1195
      _Visitor& visitor;
1196
      Constraints() {}
1196 1197
    };
1197 1198
  };
1198 1199
#endif
1199 1200

	
1200 1201
  /// \brief Default traits class of DfsVisit class.
1201 1202
  ///
1202 1203
  /// Default traits class of DfsVisit class.
1203 1204
  /// \tparam _Digraph The type of the digraph the algorithm runs on.
0 comments (0 inline)