+
Skip to content

Tags: facebook/folly

Tags

v2025.07.07.00

Toggle v2025.07.07.00's commit message
move xplat build rules: folly/functional/

Reviewed By: dmm-fb

Differential Revision: D77344445

fbshipit-source-id: 7b4185f2b45e75af03c5ffc4d4d69ac02c60a04b

v2025.06.30.00

Toggle v2025.06.30.00's commit message
apply autodeps

Reviewed By: dtolnay

Differential Revision: D77518003

fbshipit-source-id: 073cd2811e887d6814485ecfbf3822a460b557a0

v2025.06.23.00

Toggle v2025.06.23.00's commit message
cut suppressions of unreachable-code around co_yield

Summary: There is a bug in some versions of clang which may incorrectly mark some cases of co_yield as non-returning, and therefore code following them as unreachable. This bug is fixed in recent versions of clang, though.

Differential Revision: D76867701

fbshipit-source-id: 7b16a3e0e8e6b9a454b835cc2432380dea4f6dac

v2025.06.16.00

Toggle v2025.06.16.00's commit message
fix violations of implicit-int-conversion in MicroLock

Reviewed By: ot

Differential Revision: D76691047

fbshipit-source-id: 95ccd43d11ff5a23347e9b4f75b16a5a46ef47ad

v2025.06.09.00

Toggle v2025.06.09.00's commit message
Macros for improved switch-case diagnostics

Summary:
C++ switch-case statements enable writing conditional statements that are
checked for exhaustiveness by the compiler.  However, C++ compilers don't
enforce exhaustiveness very well.  These macros enable you to explicitly opt
into truly exhaustive switch-cases, that are useful for scenarios where you
may want to deal with enums that are inputs, rather than internal invariants.

Historically, we have encountered one too many instances of SEVs caused by
improper handling of enums, so these macros are used to enable stronger, and
more explicit guarantees when writing switch-cases.

For example:

   enum class logposition_t {
     sealed = -1,
     nonexistent = -2,
   };

   void foo(logposition_t logpos) {
     FOLLY_EXHAUSTIVE_SWITCH(logpos, {
       case logposition_t::sealed:
         // handle sealed case
       case logposition_t::nonexistent:
         // handle nonexistent case
       default:
         // handle non-exceptional value
     })
   }

For the above, if you miss handling any case, or if you miss the default
case, the compiler will complain.

When you switch on the value of a concretely defined enum with a very large
set of values, and only need to address a sane subset of the values, you
write a flexible switch. Additionally, when you switch on the a non-enum
value (like an int), you write a flexible switch.

   enum class Color {
     // every color in a 64 color palette named as an enum value
   };

   bool isRedColor(Color c) {
     FLEXIBLE_SWITCH(c, {
       case Color::Red:
       case Color::LightRed:
       case Color::DarkRed:
         return true;
       default:
         return false;
     })
   }

The above is the less common pattern for switch statements.

Reviewed By: NSProgrammer

Differential Revision: D75843990

fbshipit-source-id: ca8768b094079b331b80b6ade3c6270cbae58126

v2025.05.26.00

Toggle v2025.05.26.00's commit message
Fix CQS signal facebook-unused-include-check in fbcode/folly [A] [A]

Reviewed By: dtolnay

Differential Revision: D75339649

fbshipit-source-id: 40ff16c9c15888472ce9a77b6fff78e467d1dcdc

v2025.05.19.00

Toggle v2025.05.19.00's commit message
Default inline size for small_sorted_vector_map/set

Summary: folly::small_vector itself has a default inline size of 1.  Mirror this on small_sorted_vector_map/set.

Reviewed By: ilvokhin

Differential Revision: D74859557

fbshipit-source-id: d2072e0baef80118d5dfc08e5652883d0ad5cb0c

v2025.05.12.00

Toggle v2025.05.12.00's commit message
some function trait aliases and variables

Reviewed By: Orvid

Differential Revision: D74496242

fbshipit-source-id: 88ac4378cfd672acca36a12433ff7cbbcd15f2f0

v2025.05.05.00

Toggle v2025.05.05.00's commit message
Remove comments about madvise and CPUThreadPoolExecutor

Summary: CPUThreadPoolExecutor does not madvise-away the stacks of idle threads.

Reviewed By: Gownta

Differential Revision: D73703935

fbshipit-source-id: c1e777fa6641912a43644d5b853f32aeaa086204
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载