diff --git a/include/libtorrent/create_torrent.hpp b/include/libtorrent/create_torrent.hpp index ff52a83eb..b0fb9c94b 100644 --- a/include/libtorrent/create_torrent.hpp +++ b/include/libtorrent/create_torrent.hpp @@ -391,7 +391,7 @@ namespace detail { // object. The optional function ``f`` is called in between every hash that is set. ``f`` // must have the following signature:: // - // void Fun(int); + // void Fun(piece_index_t); // // The overloads that don't take an ``error_code&`` may throw an exception in case of a // file error, the other overloads sets the error code to reflect the error, if any. @@ -408,8 +408,8 @@ namespace detail { set_piece_hashes(t, p, detail::nop, ec); if (ec) throw system_error(ec); } - template - void set_piece_hashes(create_torrent& t, std::string const& p, Fun f) + inline void set_piece_hashes(create_torrent& t, std::string const& p + , std::function const& f) { error_code ec; set_piece_hashes(t, p, f, ec); @@ -439,9 +439,9 @@ namespace detail { , std::function f, error_code& ec); #ifndef BOOST_NO_EXCEPTIONS - template TORRENT_DEPRECATED - void set_piece_hashes(create_torrent& t, std::wstring const& p, Fun f) + inline void set_piece_hashes(create_torrent& t, std::wstring const& p + , std::function f) { error_code ec; set_piece_hashes_deprecated(t, p, f, ec);