0

I am trying to understand the following function

void markTail(T& node) noexcept {
  node.template setFlag<RefFlags::kMMFlag0>();
}

from https://github.com/facebook/CacheLib/blob/67d2d8be64206b6c75e123483c3ebe202b548a1c/cachelib/allocator/MMLru.h#L444

what is node.template?

273K
  • 29,503
  • 10
  • 41
  • 64
jason
  • 11
  • 1
    It tells the compiler that `setFlag` is the name of a template, otherwise there is parsing ambiguity since `<` could be the less-than operator – M.M Mar 06 '23 at 01:23

0 Answers0