Skip to content

Commit

Permalink
fix literal operator declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Mar 4, 2025
1 parent e06de31 commit b94ea71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ using lt::add_torrent_params;
using lt::total_seconds;
using lt::torrent_flags_t;
using lt::seconds;
using lt::operator "" _sv;
using lt::operator ""_sv;
using lt::address_v4;
using lt::address_v6;
using lt::make_address_v6;
Expand Down
2 changes: 1 addition & 1 deletion test/enum_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ using namespace lt;

namespace {

std::string operator "" _s(char const* str, size_t len) { return std::string(str, len); }
std::string operator ""_s(char const* str, size_t len) { return std::string(str, len); }

std::string print_flags(interface_flags const f)
{
Expand Down
2 changes: 1 addition & 1 deletion test/swarm_suite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using test_flags_t = lt::flags::bitfield_flag<std::uint32_t, struct test_flags_t

namespace test_flags
{
using lt::operator "" _bit;
using lt::operator ""_bit;
constexpr test_flags_t super_seeding = 1_bit;
constexpr test_flags_t strict_super_seeding = 2_bit;
constexpr test_flags_t seed_mode = 3_bit;
Expand Down
6 changes: 3 additions & 3 deletions test/test_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ namespace libtorrent
EXPORT std::string test_listen_interface();
}

constexpr inline lt::download_priority_t operator "" _pri(unsigned long long const p)
constexpr inline lt::download_priority_t operator ""_pri(unsigned long long const p)
{ return lt::download_priority_t(static_cast<std::uint8_t>(p)); }

constexpr inline lt::file_index_t operator "" _file(unsigned long long const p)
constexpr inline lt::file_index_t operator ""_file(unsigned long long const p)
{ return lt::file_index_t(static_cast<int>(p)); }

constexpr inline lt::piece_index_t operator "" _piece(unsigned long long const p)
constexpr inline lt::piece_index_t operator ""_piece(unsigned long long const p)
{ return lt::piece_index_t(static_cast<int>(p)); }

EXPORT std::vector<char> serialize(lt::torrent_info const& ti);
Expand Down

0 comments on commit b94ea71

Please sign in to comment.