зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6db32077dd
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче