Skip to content

Commit

Permalink
fix: issue#2362, build debug version failed with msvc(vs2022 v143) on…
Browse files Browse the repository at this point in the history
… windows
  • Loading branch information
xfc_1939 committed Jan 12, 2025
1 parent ac55124 commit a2c8fe3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ def _build(self, reconfigure) -> None:
+ [
"link=%s" % link,
"runtime-link=shared",
"variant=release",
f"variant={self.build_opts.build_type.lower()}",
"threading=multi",
"debug-symbols=on",
"visibility=global",
Expand Down
4 changes: 4 additions & 0 deletions folly/container/test/heap_vector_types_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ struct OneAtATimePolicy {

template <typename T>
struct CountingAllocator : std::allocator<T> {
CountingAllocator() noexcept = default;
template <typename U>
CountingAllocator(const CountingAllocator<U>&) noexcept {}

T* allocate(std::size_t n) {
nAllocations += 1;
return std::allocator<T>::allocate(n);
Expand Down
2 changes: 1 addition & 1 deletion folly/test/FunctionRefTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ TEST(FunctionRef, Emptiness) {
// models std::function
struct NullptrTestableInSitu {
int res;
[[maybe_unused]] explicit NullptrTestableInSitu(std::nullptr_t);
[[maybe_unused]] explicit NullptrTestableInSitu(std::nullptr_t) {}
explicit NullptrTestableInSitu(int i) : res(i) {}
CastableToBool operator==(std::nullptr_t) const { return res % 3 != 1; }
int operator()(int in) const { return res * in; }
Expand Down

0 comments on commit a2c8fe3

Please sign in to comment.