fix regression in entry constructor (#950)

This commit is contained in:
Arvid Norberg 2016-07-26 01:08:03 -04:00 committed by GitHub
parent 9af2072bc9
commit 2fae3ae835
2 changed files with 8 additions and 1 deletions

View File

@ -135,7 +135,7 @@ namespace libtorrent
// construct an empty entry of the specified type.
// see data_type enum.
explicit entry(data_type t);
entry(data_type t);
// hidden
entry(entry const& e);

View File

@ -134,6 +134,13 @@ TORRENT_TEST(undefined_node2)
TEST_EQUAL(encode(e), "d4:info0:e");
}
TORRENT_TEST(implicit_construct)
{
entry e(entry::list_t);
e.list().push_back(entry::list_t);
TEST_EQUAL(e.list().back().type(), entry::list_t);
}
#ifndef TORRENT_NO_DEPRECATE
TORRENT_TEST(lazy_entry)
{