Skip to content

Commit

Permalink
Merge pull request #33180 from vespa-engine/toregge/remove-deprecated…
Browse files Browse the repository at this point in the history
…-space-between-literal-operator-quotes-and-suffix

Remove deprecated space between literal operator quotes and suffix.
  • Loading branch information
vekterli authored Jan 27, 2025
2 parents cbd8743 + b4ad7ee commit 7eb6f9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions vespalib/src/vespa/vespalib/util/size_literals.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

#include <cstddef>

constexpr size_t operator "" _Ki(unsigned long long k_in) {
constexpr size_t operator ""_Ki(unsigned long long k_in) {
return size_t(k_in << 10u);
}

constexpr size_t operator "" _Mi(unsigned long long m_in) {
constexpr size_t operator ""_Mi(unsigned long long m_in) {
return size_t(m_in << 20u);
}

constexpr size_t operator "" _Gi(unsigned long long g_in) {
constexpr size_t operator ""_Gi(unsigned long long g_in) {
return size_t(g_in << 30u);
}

constexpr size_t operator "" _Ti(unsigned long long t_in) {
constexpr size_t operator ""_Ti(unsigned long long t_in) {
return size_t(t_in << 40u);
}
6 changes: 3 additions & 3 deletions vespalib/src/vespa/vespalib/util/static_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace vespalib {

class StaticStringView;
namespace literals {
constexpr StaticStringView operator "" _ssv(const char *literal, size_t size);
constexpr StaticStringView operator ""_ssv(const char *literal, size_t size);
} // literals

/**
Expand All @@ -18,7 +18,7 @@ constexpr StaticStringView operator "" _ssv(const char *literal, size_t size);
class StaticStringView {
private:
std::string_view _view;
friend constexpr StaticStringView literals::operator "" _ssv(const char *, size_t);
friend constexpr StaticStringView literals::operator ""_ssv(const char *, size_t);
constexpr StaticStringView(const char *literal, size_t size) noexcept
: _view(literal, size) {}
public:
Expand All @@ -28,7 +28,7 @@ class StaticStringView {
};

namespace literals {
constexpr StaticStringView operator "" _ssv(const char *literal, size_t size) {
constexpr StaticStringView operator ""_ssv(const char *literal, size_t size) {
return {literal, size};
}
} // literals
Expand Down

0 comments on commit 7eb6f9c

Please sign in to comment.