--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaSvnXZ%3DnLZ4o3gnJp1jCgZSf%3D6QM7jUeDvbkwyMP0N%3D9w%40mail.gmail.com.
The majority of the attributes in your codesearch link are ABSL_FALLTHROUGH_INTENDED and those should be migrated to [[fallthrough]].The others I see are ABSL_ATTRIBUTE_RETURNS_NONNULL, ABSL_DEPRECATED, and ABSL_CONST_INIT.ABSL_ATTRIBUTE_RETURNS_NONNULL is defined as __attribute__((returns_nonnull)). I could see using it.ABSL_DEPRECATED is defined as __attribute__((deprecated(message))). IMO it would be better to directly use [[deprecated()]] which is C++14.ABSL_CONST_INIT is defined as [[clang::require_constant_initialization]]. I could see using it.In general, if something is offered by the standard, we should use the standard. If it is not, I could see us using the ABSL version. But I don't agree with a blanket allow of ABSL attributes.
On Thu, Jul 7, 2022 at 10:01 AM Avi Drissman <a...@google.com> wrote:The majority of the attributes in your codesearch link are ABSL_FALLTHROUGH_INTENDED and those should be migrated to [[fallthrough]].The others I see are ABSL_ATTRIBUTE_RETURNS_NONNULL, ABSL_DEPRECATED, and ABSL_CONST_INIT.ABSL_ATTRIBUTE_RETURNS_NONNULL is defined as __attribute__((returns_nonnull)). I could see using it.ABSL_DEPRECATED is defined as __attribute__((deprecated(message))). IMO it would be better to directly use [[deprecated()]] which is C++14.ABSL_CONST_INIT is defined as [[clang::require_constant_initialization]]. I could see using it.In general, if something is offered by the standard, we should use the standard. If it is not, I could see us using the ABSL version. But I don't agree with a blanket allow of ABSL attributes.Yes, I agree. I will rephrase. I would suggest that we allow the attributes but prefer C++ standard attributes over ABSL ones when they exist for backwards compat.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaQb0%3Dr4MXUqgBE2uRsrKCbPuboj-uQH6GfXAPw29Urgeg%40mail.gmail.com.