Developer
Yuxuan Chen
ych@meta.com
Performance
YoY:+2300%Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
No bugs introduced or fixed in this period.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files | Effort |
|---|---|---|---|---|
| 7d5ea72 | This commit **fixes a `-Wnonnull` compiler warning** in `folly/Conv.h` that arises with libc++ 21's stricter diagnostics. The warning was triggered in the `toAppend` function because `std::string::append` is `nonnull` annotated, and passing a potentially null `value` parameter, even after a null check on an alias, caused a diagnostic. This **maintenance fix** addresses the issue by passing the already null-checked local variable `c` to `result->append` instead of the original `value`. This ensures the `folly` library continues to compile cleanly with newer, stricter compiler versions, preventing build failures related to `nonnull` annotations. | Feb 28 | 1 | waste |
| 2bfb64e | This commit provides a **bug fix** for **`ExceptionTracerLib`** to resolve **duplicate symbol errors** when linked against **buckified libc++** (built from source). Specifically, it addresses conflicts arising from `__cxa_throw`, `__cxa_rethrow`, `__cxa_begin_catch`, `__cxa_end_catch`, and `std::rethrow_exception` being defined in both `ExceptionTracerLib.cpp` and statically linked libc++ archives. The fix extends the `--wrap` linker mechanism, previously used for libstdc++, to buckified libc++ by introducing a `LIBCXX_BUCKIFIED_SELECTOR` and enabling `FOLLY_INSTALL_STATIC_CXA_FUNCTIONS_WRAPPERS` in `folly/debugging/exception_tracer/BUCK`. This **improves build system compatibility** for projects using `folly/debugging/exception_tracer` with custom libc++ configurations. | Feb 25 | 1 | waste |
| fc03469 | This commit **fixes** a critical issue in **Folly's async stack tracing** mechanism by applying `FOLLY_NOINLINE` to the `getAsyncStackTraceSafe` function in `folly/debugging/symbolizer/StackTrace.cpp` and `StackTrace.h`. This prevents compiler inlining, which would otherwise cause builtins like `__builtin_return_address` and `__builtin_frame_address` to incorrectly refer to the caller's frame instead of `getAsyncStackTraceSafe`'s own frame. The change ensures the **correctness and reliability of async stack traces** generated by the **symbolizer** module. A supporting update to the `BUCK` file and header inclusion for `CPortability.h` were also made. | Feb 24 | 4 | waste |
| 8ea8d8d | This commit provides a **bug fix** for the **exception tracing** mechanism in `folly/debugging/exception_tracer` to ensure stack traces are correctly captured when using `libc++abi`. It addresses a **compatibility issue** where `libc++abi`'s internal `__cxa_begin_catch` calls bypass our symbol interposition hooks, leading to empty caught exception trace stacks even when exceptions are present. The change introduces a **fallback in `getCurrentExceptions()`** to check and utilize the uncaught exception trace stack when the caught stack is empty, along with modifications to drain orphaned uncaught stack entries. This effectively **restores full stack trace availability** for exception tracers, significantly improving debugging capabilities under `libc++`. | Feb 24 | 4 | waste |
| 54d3aaf | This commit **adds a new automated test** for **folly's `exception_tracer`** to validate its behavior with **uncaught exceptions**. A new Python unittest now executes a companion C++ binary that intentionally throws an uncaught `std::runtime_error` from a `noinline` function, ensuring stack frame visibility. The test asserts that the process terminates with `SIGABRT` and that the `exception_tracer` output correctly includes the exception type and expected stack frames like `foo()` and `main()`. This **enhances the reliability** of the `exception_tracer` by ensuring accurate stack trace reporting for critical, unhandled errors within the `folly/debugging` subsystem. | Feb 24 | 3 | maint |
| 88bd9bc | This commit performs **build system maintenance** for the `folly/debugging/exception_tracer/test` module. It **fixes automatic dependency generation** by removing an unused `glog` dependency from the `BUCK` file. Additionally, a manual comment was added to an existing dependency for improved clarity. This change streamlines the build process for the **exception tracer tests**, ensuring only necessary components are linked and improving build efficiency. | Feb 23 | 1 | maint |
| d4497e9 | This commit introduces a **new automated test** for `folly`'s **`exception_tracer`** component, specifically validating its behavior when an **uncaught C++ exception** leads to process termination. The test, implemented as a `python_unittest`, executes a companion C++ binary that deliberately throws an `std::runtime_error` and asserts that the process dies with `SIGABRT`. It then verifies that the `exception_tracer` output correctly captures the exception type and expected stack frames, such as `foo()` and `main()`, ensuring visibility even in optimized builds through `__attribute__((noinline))`. This **maintenance** work enhances the reliability and correctness of `folly`'s debugging capabilities by ensuring accurate stack trace generation for critical failures. | Feb 20 | 3 | maint |
| 2ee6d60 | This commit **fixes a regression** in `folly::exception_tracer` that prevented it from producing stack traces for **libc++ builds** within **fbcode**. The change unifies the exception interposition mechanism to consistently use the more robust `--wrap` linker flag, replacing the unreliable `dlsym(RTLD_NEXT)` approach which was susceptible to ASAN stubs and PLT resolution issues. The `folly/debugging/exception_tracer/BUCK` file is updated to enforce this, and `getCurrentExceptions()` in `ExceptionTracer.cpp` now falls back to uncaught exception traces when caught traces are empty, handling internal `libc++abi.so` calls. This **bug fix** ensures **reliable and consistent exception stack tracing** across all C++ standard libraries and linkage modes in fbcode. | Feb 20 | 2 | waste |
| a1910af | This commit provides a **bug fix** for **`folly/system/AtFork`**, addressing **false positive thread-safety analysis warnings** encountered with newer Clang versions (LLVM 21). It applies the `no_thread_safety_analysis` attribute to the `prepare`, `parent`, and `child` functions in `AtFork.cpp`, which correctly manage a mutex across `fork()` boundaries in a way the static analyzer cannot track. To facilitate this, a new macro, `FOLLY_ATTR_CLANG_NO_THREAD_SAFETY_ANALYSIS`, is introduced in `folly/CppAttributes.h`. This ensures the **`folly/system` module** compiles without warnings, maintaining compatibility with stricter compiler analyses. | Feb 19 | 4 | waste |
| 60fb359 | This commit provides a **bug fix** for an **IFNDR circular dependency** within the **`folly::not_null`** conversion operator SFINAE, specifically affecting the `is_not_null_castable` and `is_not_null_move_castable` traits. Previously, `std::integral_constant`'s eager instantiation led to infinite template recursion when `not_null` conversion operators were probed by libraries like `nlohmann::json` under libc++. The fix replaces `std::integral_constant` with `std::conjunction` in `folly/memory/not_null-inl.h`, leveraging its **short-circuit instantiation** to break the recursive cycle. This **template metaprogramming correction** ensures correct SFINAE behavior and improves compilation robustness for `not_null` conversions. | Feb 6 | 1 | waste |
| e197b3a | This commit **temporarily forces `libc++` to be linked as a shared library** within the build system. This **maintenance change** addresses a critical linkage issue where static `libc++` in optimized builds, particularly in Python environments with Dynamically Linked Shared Objects (DSOs), causes duplicate static and dynamic linkage errors. Specifically, it **prevents `cinderx` from failing to work** due to these conflicts. While static linking remains possible without DSOs, this ensures immediate stability and functionality until a more robust solution for static `libc++` linkage alongside DSOs can be implemented. | Nov 19 | 2 | – |
| 946f2b0 | This commit **fixes a regression** in the **`folly::debugging::exception_tracer`** module by correcting an erroneous assumption about `libc++` static linking. Previously, `exception tracer callbacks` would not always run due to an incorrect build configuration that treated `libc++` as statically linked in all scenarios. The change refines the build configuration selectors in `folly/debugging/exception_tracer/BUCK` to ensure `libc++` is only statically linked when in `opt` build mode. This **restores the reliable execution of exception tracer callbacks** across various build configurations. | Oct 17 | 1 | waste |
| 597f51b | This commit **enhances the build system** for the **`folly/debugging/exception_tracer`** module by **refactoring its BUCK build rules**. It introduces **conditional linking for `libc++` and `libstdc++`**, enforcing **static linking specifically for `fbcode buck opt builds`** while defaulting to dynamic linking otherwise. This **build system enhancement** also updates `ExceptionTracerLib.cpp` to utilize new conditional compilation flags like `FOLLY_INSTALL_STATIC_CXA_FUNCTIONS_WRAPPERS`, ensuring the **exception tracing functionality** correctly adapts to the chosen linking strategy. The change optimizes build configurations for specific environments, impacting how the Folly library's exception handling components are compiled. | Oct 16 | 2 | maint |
| e318b43 | This commit **removes the deprecated and unused `fbcode_compiler_flags_override` attribute** from `non_fbcode_target` build rules within **Folly's `BUCK` file**. This **maintenance** change addresses an obsolete build configuration option that was problematic for `Fbcode` variants and is now actively rejected by the build system, causing errors if present. By **cleaning up the build system configuration**, this commit ensures that **Folly** builds correctly and avoids potential future build failures related to this legacy flag. | Oct 15 | 2 | maint |
| 7068d24 | This commit introduces **new `find_first` and `find_next` functions** for `std::bitset` within the **`folly/container/StdBitset.h`** module. These functions provide **libc++-specific implementations** for common bit-finding operations, mimicking non-standard GNU C++ extensions like `_Find_first()` and `_Find_next()`. The implementation is **performance-optimized** by processing `std::bitset` data one word at a time using bit-counting STL functions, significantly improving efficiency over bit-by-bit checks. This **enhances the utility and performance** of `std::bitset` for users compiling with `libc++`, offering a crucial capability for bit manipulation. | Sep 4 | 1 | grow |
| 311d6f6 | This commit **introduces new performance benchmarks** for the `std::bitset` utility functions, specifically `std_bitset_find_first_fn` and `std_bitset_find_next_fn`, within the **`folly/container`** module. The benchmarks, located in `folly/container/test/StdBitsetBenchmark.cpp`, evaluate these operations across various bitset sizes and densities, utilizing helper functions like `createRandomBitset`. This **new capability** provides a critical tool for **performance analysis**, allowing developers to compare the efficiency of `std::bitset`'s `find_first` and `find_next` operations, particularly against GNU libstdc++'s private implementations. This **maintenance work** enhances the **testing infrastructure** by enabling detailed performance evaluation, which can inform future **optimization decisions** for these core `folly/container` utilities. | Sep 4 | 2 | maint |
| 933ec9b | This commit **aligns `folly::small_vector`'s reallocation behavior with `std::vector`**, ensuring that contained types meet `Cpp17MoveInsertable` requirements. Previously, the **`folly::small_vector` container** could incorrectly attempt to move types that were trivially copyable but not move constructible during reallocations, a divergence from standard library behavior. This **bug fix** introduces a `should_trivially_copy` trait within `folly/container/small_vector.h` to guard trivial copy logic, preventing potential undefined behavior. The change **improves the robustness and compatibility** of `folly::small_vector` by enforcing correct semantic requirements for element relocation. | Jul 25 | 1 | maint |
| 1e33ae5 | This commit **fixes a static compilation error** in `folly::small_vector`'s constructors by modifying the internal `makeSize` and `makeSizeInternal` methods. Previously, `small_vector` could not be constructed with types `T` that were not move constructible, even if the move constructor was never dynamically called, due to static type checking. The change makes the move constructor call conditional, **allowing `small_vector` to be used with immovable types** and significantly **improving the type compatibility** of the container. New **test cases** have been added to `folly/container/test/small_vector_test.cpp` to verify this corrected behavior. | Jul 25 | 2 | maint |
| d713153 | This commit **fixes a bug** in the **Thrift C++2 protocol library**'s handling of `std::vector<bool>::reference` when a custom allocator is used. Specifically, the `protocol_methods` for reading boolean integral types failed with `libc++` due to its distinct implementation of `std::vector<bool, Alloc>::reference` compared to `GNU libstdc++`. To address this **compatibility issue**, a new type concept, `folly::vector_bool_reference`, is introduced, enabling the `read` method in `thrift/lib/cpp2/protocol/detail/protocol_methods.h` to correctly match and deserialize these specialized boolean vector references. This ensures **robust and consistent deserialization** of `std::vector<bool>` across different standard library implementations. | May 23 | 1 | waste |
| 9b2f23e | This commit introduces a new **type trait** `folly::is_vector_bool_reference_v` and a corresponding concept `folly::vector_bool_reference` within the **Folly library's `lang` module**. This **new capability** provides a robust solution to long-standing **portability issues** with `std::vector<bool>::reference` types, which exhibit inconsistent behavior across different standard library implementations (libstdc++, libc++, MSVC STL) and custom allocators. By offering a reliable mechanism to identify these special reference types, it enables developers to write **correct and portable generic code**. This is particularly beneficial for **serialization libraries** and other generic contexts that need to interact with `std::vector<bool>` elements consistently and reliably. | May 22 | 4 | maint |
This commit **fixes a `-Wnonnull` compiler warning** in `folly/Conv.h` that arises with libc++ 21's stricter diagnostics. The warning was triggered in the `toAppend` function because `std::string::append` is `nonnull` annotated, and passing a potentially null `value` parameter, even after a null check on an alias, caused a diagnostic. This **maintenance fix** addresses the issue by passing the already null-checked local variable `c` to `result->append` instead of the original `value`. This ensures the `folly` library continues to compile cleanly with newer, stricter compiler versions, preventing build failures related to `nonnull` annotations.
This commit provides a **bug fix** for **`ExceptionTracerLib`** to resolve **duplicate symbol errors** when linked against **buckified libc++** (built from source). Specifically, it addresses conflicts arising from `__cxa_throw`, `__cxa_rethrow`, `__cxa_begin_catch`, `__cxa_end_catch`, and `std::rethrow_exception` being defined in both `ExceptionTracerLib.cpp` and statically linked libc++ archives. The fix extends the `--wrap` linker mechanism, previously used for libstdc++, to buckified libc++ by introducing a `LIBCXX_BUCKIFIED_SELECTOR` and enabling `FOLLY_INSTALL_STATIC_CXA_FUNCTIONS_WRAPPERS` in `folly/debugging/exception_tracer/BUCK`. This **improves build system compatibility** for projects using `folly/debugging/exception_tracer` with custom libc++ configurations.
This commit **fixes** a critical issue in **Folly's async stack tracing** mechanism by applying `FOLLY_NOINLINE` to the `getAsyncStackTraceSafe` function in `folly/debugging/symbolizer/StackTrace.cpp` and `StackTrace.h`. This prevents compiler inlining, which would otherwise cause builtins like `__builtin_return_address` and `__builtin_frame_address` to incorrectly refer to the caller's frame instead of `getAsyncStackTraceSafe`'s own frame. The change ensures the **correctness and reliability of async stack traces** generated by the **symbolizer** module. A supporting update to the `BUCK` file and header inclusion for `CPortability.h` were also made.
This commit provides a **bug fix** for the **exception tracing** mechanism in `folly/debugging/exception_tracer` to ensure stack traces are correctly captured when using `libc++abi`. It addresses a **compatibility issue** where `libc++abi`'s internal `__cxa_begin_catch` calls bypass our symbol interposition hooks, leading to empty caught exception trace stacks even when exceptions are present. The change introduces a **fallback in `getCurrentExceptions()`** to check and utilize the uncaught exception trace stack when the caught stack is empty, along with modifications to drain orphaned uncaught stack entries. This effectively **restores full stack trace availability** for exception tracers, significantly improving debugging capabilities under `libc++`.
This commit **adds a new automated test** for **folly's `exception_tracer`** to validate its behavior with **uncaught exceptions**. A new Python unittest now executes a companion C++ binary that intentionally throws an uncaught `std::runtime_error` from a `noinline` function, ensuring stack frame visibility. The test asserts that the process terminates with `SIGABRT` and that the `exception_tracer` output correctly includes the exception type and expected stack frames like `foo()` and `main()`. This **enhances the reliability** of the `exception_tracer` by ensuring accurate stack trace reporting for critical, unhandled errors within the `folly/debugging` subsystem.
This commit performs **build system maintenance** for the `folly/debugging/exception_tracer/test` module. It **fixes automatic dependency generation** by removing an unused `glog` dependency from the `BUCK` file. Additionally, a manual comment was added to an existing dependency for improved clarity. This change streamlines the build process for the **exception tracer tests**, ensuring only necessary components are linked and improving build efficiency.
This commit introduces a **new automated test** for `folly`'s **`exception_tracer`** component, specifically validating its behavior when an **uncaught C++ exception** leads to process termination. The test, implemented as a `python_unittest`, executes a companion C++ binary that deliberately throws an `std::runtime_error` and asserts that the process dies with `SIGABRT`. It then verifies that the `exception_tracer` output correctly captures the exception type and expected stack frames, such as `foo()` and `main()`, ensuring visibility even in optimized builds through `__attribute__((noinline))`. This **maintenance** work enhances the reliability and correctness of `folly`'s debugging capabilities by ensuring accurate stack trace generation for critical failures.
This commit **fixes a regression** in `folly::exception_tracer` that prevented it from producing stack traces for **libc++ builds** within **fbcode**. The change unifies the exception interposition mechanism to consistently use the more robust `--wrap` linker flag, replacing the unreliable `dlsym(RTLD_NEXT)` approach which was susceptible to ASAN stubs and PLT resolution issues. The `folly/debugging/exception_tracer/BUCK` file is updated to enforce this, and `getCurrentExceptions()` in `ExceptionTracer.cpp` now falls back to uncaught exception traces when caught traces are empty, handling internal `libc++abi.so` calls. This **bug fix** ensures **reliable and consistent exception stack tracing** across all C++ standard libraries and linkage modes in fbcode.
This commit provides a **bug fix** for **`folly/system/AtFork`**, addressing **false positive thread-safety analysis warnings** encountered with newer Clang versions (LLVM 21). It applies the `no_thread_safety_analysis` attribute to the `prepare`, `parent`, and `child` functions in `AtFork.cpp`, which correctly manage a mutex across `fork()` boundaries in a way the static analyzer cannot track. To facilitate this, a new macro, `FOLLY_ATTR_CLANG_NO_THREAD_SAFETY_ANALYSIS`, is introduced in `folly/CppAttributes.h`. This ensures the **`folly/system` module** compiles without warnings, maintaining compatibility with stricter compiler analyses.
This commit provides a **bug fix** for an **IFNDR circular dependency** within the **`folly::not_null`** conversion operator SFINAE, specifically affecting the `is_not_null_castable` and `is_not_null_move_castable` traits. Previously, `std::integral_constant`'s eager instantiation led to infinite template recursion when `not_null` conversion operators were probed by libraries like `nlohmann::json` under libc++. The fix replaces `std::integral_constant` with `std::conjunction` in `folly/memory/not_null-inl.h`, leveraging its **short-circuit instantiation** to break the recursive cycle. This **template metaprogramming correction** ensures correct SFINAE behavior and improves compilation robustness for `not_null` conversions.
This commit **temporarily forces `libc++` to be linked as a shared library** within the build system. This **maintenance change** addresses a critical linkage issue where static `libc++` in optimized builds, particularly in Python environments with Dynamically Linked Shared Objects (DSOs), causes duplicate static and dynamic linkage errors. Specifically, it **prevents `cinderx` from failing to work** due to these conflicts. While static linking remains possible without DSOs, this ensures immediate stability and functionality until a more robust solution for static `libc++` linkage alongside DSOs can be implemented.
This commit **fixes a regression** in the **`folly::debugging::exception_tracer`** module by correcting an erroneous assumption about `libc++` static linking. Previously, `exception tracer callbacks` would not always run due to an incorrect build configuration that treated `libc++` as statically linked in all scenarios. The change refines the build configuration selectors in `folly/debugging/exception_tracer/BUCK` to ensure `libc++` is only statically linked when in `opt` build mode. This **restores the reliable execution of exception tracer callbacks** across various build configurations.
This commit **enhances the build system** for the **`folly/debugging/exception_tracer`** module by **refactoring its BUCK build rules**. It introduces **conditional linking for `libc++` and `libstdc++`**, enforcing **static linking specifically for `fbcode buck opt builds`** while defaulting to dynamic linking otherwise. This **build system enhancement** also updates `ExceptionTracerLib.cpp` to utilize new conditional compilation flags like `FOLLY_INSTALL_STATIC_CXA_FUNCTIONS_WRAPPERS`, ensuring the **exception tracing functionality** correctly adapts to the chosen linking strategy. The change optimizes build configurations for specific environments, impacting how the Folly library's exception handling components are compiled.
This commit **removes the deprecated and unused `fbcode_compiler_flags_override` attribute** from `non_fbcode_target` build rules within **Folly's `BUCK` file**. This **maintenance** change addresses an obsolete build configuration option that was problematic for `Fbcode` variants and is now actively rejected by the build system, causing errors if present. By **cleaning up the build system configuration**, this commit ensures that **Folly** builds correctly and avoids potential future build failures related to this legacy flag.
This commit introduces **new `find_first` and `find_next` functions** for `std::bitset` within the **`folly/container/StdBitset.h`** module. These functions provide **libc++-specific implementations** for common bit-finding operations, mimicking non-standard GNU C++ extensions like `_Find_first()` and `_Find_next()`. The implementation is **performance-optimized** by processing `std::bitset` data one word at a time using bit-counting STL functions, significantly improving efficiency over bit-by-bit checks. This **enhances the utility and performance** of `std::bitset` for users compiling with `libc++`, offering a crucial capability for bit manipulation.
This commit **introduces new performance benchmarks** for the `std::bitset` utility functions, specifically `std_bitset_find_first_fn` and `std_bitset_find_next_fn`, within the **`folly/container`** module. The benchmarks, located in `folly/container/test/StdBitsetBenchmark.cpp`, evaluate these operations across various bitset sizes and densities, utilizing helper functions like `createRandomBitset`. This **new capability** provides a critical tool for **performance analysis**, allowing developers to compare the efficiency of `std::bitset`'s `find_first` and `find_next` operations, particularly against GNU libstdc++'s private implementations. This **maintenance work** enhances the **testing infrastructure** by enabling detailed performance evaluation, which can inform future **optimization decisions** for these core `folly/container` utilities.
This commit **aligns `folly::small_vector`'s reallocation behavior with `std::vector`**, ensuring that contained types meet `Cpp17MoveInsertable` requirements. Previously, the **`folly::small_vector` container** could incorrectly attempt to move types that were trivially copyable but not move constructible during reallocations, a divergence from standard library behavior. This **bug fix** introduces a `should_trivially_copy` trait within `folly/container/small_vector.h` to guard trivial copy logic, preventing potential undefined behavior. The change **improves the robustness and compatibility** of `folly::small_vector` by enforcing correct semantic requirements for element relocation.
This commit **fixes a static compilation error** in `folly::small_vector`'s constructors by modifying the internal `makeSize` and `makeSizeInternal` methods. Previously, `small_vector` could not be constructed with types `T` that were not move constructible, even if the move constructor was never dynamically called, due to static type checking. The change makes the move constructor call conditional, **allowing `small_vector` to be used with immovable types** and significantly **improving the type compatibility** of the container. New **test cases** have been added to `folly/container/test/small_vector_test.cpp` to verify this corrected behavior.
This commit **fixes a bug** in the **Thrift C++2 protocol library**'s handling of `std::vector<bool>::reference` when a custom allocator is used. Specifically, the `protocol_methods` for reading boolean integral types failed with `libc++` due to its distinct implementation of `std::vector<bool, Alloc>::reference` compared to `GNU libstdc++`. To address this **compatibility issue**, a new type concept, `folly::vector_bool_reference`, is introduced, enabling the `read` method in `thrift/lib/cpp2/protocol/detail/protocol_methods.h` to correctly match and deserialize these specialized boolean vector references. This ensures **robust and consistent deserialization** of `std::vector<bool>` across different standard library implementations.
This commit introduces a new **type trait** `folly::is_vector_bool_reference_v` and a corresponding concept `folly::vector_bool_reference` within the **Folly library's `lang` module**. This **new capability** provides a robust solution to long-standing **portability issues** with `std::vector<bool>::reference` types, which exhibit inconsistent behavior across different standard library implementations (libstdc++, libc++, MSVC STL) and custom allocators. By offering a reliable mechanism to identify these special reference types, it enables developers to write **correct and portable generic code**. This is particularly beneficial for **serialization libraries** and other generic contexts that need to interact with `std::vector<bool>` elements consistently and reliably.
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.