From 397e12c7df6c4ca40d5bc988bc4b968c34fc4ac1 Mon Sep 17 00:00:00 2001 From: Denis Yaroshevskiy Date: Thu, 1 Aug 2024 06:08:32 -0700 Subject: [PATCH] folly concepts #1 (#2249) Summary: Pull Request resolved: https://github.com/facebook/folly/pull/2249 We have a need for some common concepts that are used in many places. This is a proposal, please let me know what you think. Differential Revision: D59396081 --- folly/Traits.h | 30 +++++++++++++++++++++++++++++ folly/test/PortabilityTest.cpp | 4 ---- folly/test/TraitsTest.cpp | 35 ++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/folly/Traits.h b/folly/Traits.h index 3c6b86e1301..0a22c741dcd 100644 --- a/folly/Traits.h +++ b/folly/Traits.h @@ -166,6 +166,8 @@ struct is_bounded_array : std::bool_constant> {}; /// Note that this only works with type template parameters. It does not work /// with non-type template parameters, template template parameters, or alias /// templates. +/// +/// NOTE: there is also `instantiation_of` concept template