[libc++] Annotate generic_category/system_category as const (#78052)

This lets the compiler eliminate unused/duplicate calls to it.
This commit is contained in:
Benjamin Kramer 2024-01-26 22:08:36 +01:00 committed by GitHub
parent 82afd9b19a
commit 3fa14233c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,8 +67,8 @@ public:
string message(int __ev) const override; string message(int __ev) const override;
}; };
_LIBCPP_EXPORTED_FROM_ABI const error_category& generic_category() _NOEXCEPT; __attribute__((__const__)) _LIBCPP_EXPORTED_FROM_ABI const error_category& generic_category() _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI const error_category& system_category() _NOEXCEPT; __attribute__((__const__)) _LIBCPP_EXPORTED_FROM_ABI const error_category& system_category() _NOEXCEPT;
_LIBCPP_END_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD