Skip to content

Commit

Permalink
Part of Ubuntu22 build fix
Browse files Browse the repository at this point in the history
Summary:
Currently Ubuntu22 is failing due to submodule. But before that, there was a failure

```
In file included from /home/runner/work/CacheLib/CacheLib/cachelib/allocator/tests/ChainedHashTest.cpp:18:
/home/runner/work/CacheLib/CacheLib/cachelib/../cachelib/allocator/tests/AccessTypeTest.h: In member function ‘void facebook::cachelib::tests::AccessTypeTest<AccessType>::testIteratorMayContainNull()’:
/home/runner/work/CacheLib/CacheLib/cachelib/../cachelib/allocator/tests/AccessTypeTest.h:596:49: error: need ‘typename’ before ‘facebook::cachelib::tests::AccessTypeTest<AccessType>::Node::Handle’ because ‘facebook::cachelib::tests::AccessTypeTest<AccessType>::Node’ is a dependent scope
  596 |               [&keyToReturnNull](Node* node) -> Node::Handle {
      |                                                 ^~~~
      |                                                 typename
/home/runner/work/CacheLib/CacheLib/cachelib/../cachelib/allocator/tests/AccessTypeTest.h: In instantiation of ‘void facebook::cachelib::tests::AccessTypeTest<AccessType>::testIteratorMayContainNull() [with AccessType = facebook::cachelib::ChainedHashTable]’:
/home/runner/work/CacheLib/CacheLib/cachelib/allocator/tests/ChainedHashTest.cpp:57:29:   required from here
/home/runner/work/CacheLib/CacheLib/cachelib/../cachelib/allocator/tests/AccessTypeTest.h:595:13: error: no matching function for call to ‘facebook::cach
```

This diff fixes this failure in particular.

Reviewed By: therealgymmy

Differential Revision: D58554675

fbshipit-source-id: ffa0c110cf5bc79f1cdf58c51b572edf5bb797be
  • Loading branch information
Hao Wu authored and facebook-github-bot committed Jun 21, 2024
1 parent c25161a commit b4b935d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cachelib/allocator/tests/AccessTypeTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ template <typename AccessType>
void AccessTypeTest<AccessType>::testIteratorMayContainNull() {
std::string keyToReturnNull{};
Container c{Config{}, PtrCompressor{},
[&keyToReturnNull](Node* node) -> Node::Handle {
[&keyToReturnNull](Node* node) -> typename Node::Handle {
if (!node) {
return nullptr;
}
Expand Down

0 comments on commit b4b935d

Please sign in to comment.