mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1924278 - Remove whitespace in literal operator declarations. r=nika
That form has been deprecated, and clang trunk now complains about it. See https://cplusplus.github.io/CWG/issues/2521.html Differential Revision: https://phabricator.services.mozilla.com/D225560
This commit is contained in:
parent
6db32077dd
commit
8aedb008df
@ -16,19 +16,19 @@
|
||||
//
|
||||
// size_t page_size = 4_KiB;
|
||||
//
|
||||
constexpr size_t operator"" _KiB(unsigned long long int aNum) {
|
||||
constexpr size_t operator""_KiB(unsigned long long int aNum) {
|
||||
return size_t(aNum) * 1024;
|
||||
}
|
||||
|
||||
constexpr size_t operator"" _KiB(long double aNum) {
|
||||
constexpr size_t operator""_KiB(long double aNum) {
|
||||
return size_t(aNum * 1024);
|
||||
}
|
||||
|
||||
constexpr size_t operator"" _MiB(unsigned long long int aNum) {
|
||||
constexpr size_t operator""_MiB(unsigned long long int aNum) {
|
||||
return size_t(aNum) * 1024_KiB;
|
||||
}
|
||||
|
||||
constexpr size_t operator"" _MiB(long double aNum) {
|
||||
constexpr size_t operator""_MiB(long double aNum) {
|
||||
return size_t(aNum * 1024_KiB);
|
||||
}
|
||||
|
||||
|
@ -91,8 +91,8 @@ class nsTLiteralString : public mozilla::detail::nsTStringRepr<T> {
|
||||
// any non-private use of that constructor would get into the codebase.
|
||||
#if defined(__clang__)
|
||||
private:
|
||||
friend constexpr auto operator"" _ns(const char* aStr, std::size_t aLen);
|
||||
friend constexpr auto operator"" _ns(const char16_t* aStr, std::size_t aLen);
|
||||
friend constexpr auto operator""_ns(const char* aStr, std::size_t aLen);
|
||||
friend constexpr auto operator""_ns(const char16_t* aStr, std::size_t aLen);
|
||||
#else
|
||||
public:
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user