Skip to content

Commit 23dda6b

Browse files
authored
Merge pull request #19 from gerddie/master
Fix compilation with g++-6, Closes: #16 and automatically run test suite
2 parents ec0810c + d8b694b commit 23dda6b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/graph/hash_graph.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,13 @@ class HashGraph
188188
void clear() { vertex_table_.clear(); num_edges_ = 0; }
189189

190190
private:
191+
#if __cplusplus >= 201103L
192+
HashGraph(const HashGraph &) = delete;
193+
const HashGraph &operator =(const HashGraph &) = delete;
194+
#else
191195
HashGraph(const HashGraph &);
192196
const HashGraph &operator =(const HashGraph &);
197+
#endif
193198

194199
bool GetNextVertexAdaptor(const HashGraphVertexAdaptor &current, HashGraphVertexAdaptor &next)
195200
{
@@ -428,7 +433,7 @@ inline std::ostream &operator <<(std::ostream &os, HashGraph &hash_graph)
428433

429434
namespace std
430435
{
431-
template <> inline void swap(HashGraph &x, HashGraph &y)
436+
inline void swap(HashGraph &x, HashGraph &y)
432437
{ x.swap(y); }
433438
}
434439

test/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sequence_unittest_SOURCES = $(top_srcdir)/src/test/sequence_unittest.cpp
1616
short_sequence_unittest_SOURCES = $(top_srcdir)/src/test/short_sequence_unittest.cpp
1717
hash_map_unittest_SOURCES = $(top_srcdir)/src/test/hash_map_unittest.cpp
1818

19-
noinst_PROGRAMS = \
19+
check_PROGRAMS = \
2020
compact_sequence_unittest \
2121
hash_table_unittest \
2222
bit_edges_unittest \
@@ -30,3 +30,4 @@ noinst_PROGRAMS = \
3030
short_sequence_unittest \
3131
hash_map_unittest
3232

33+
TESTS=$(check_PROGRAMS)

0 commit comments

Comments
 (0)