TGViewer
this->notes. this->notes. @thisnotes · 4.51K subscribers
Post #113 672
this->notes. #poll Использование variadic templates очевидно облегчает жизнь программистам. Однако бывают совсем экзотические свёртки с их участием. Давайте посмотрим на одну такую. Имеем бинарное дерево на 1й картинке. И мы хотим заставить работать код на второй картинке.…
#poll
Спасибо за ваши ответы : ) Правильное решение было, но моё немного отличается, потому предлагаю такое:

template<class T, class... Args>
Node<T>* tree_get(Node<T>* top, Args... args) {
return (top ->* ... ->* args);
}

auto left = &Node<int>::left;
auto right = &Node<int>::right;
  • 👍 1
More from @thisnotes
  1. Sep 25, 2026Спасибо большое!
  2. Sep 25, 2026Post #525
  3. Sep 25, 2026Post #524
  4. Sep 25, 2026Post #523
  5. Sep 25, 2026Post #522
  6. Sep 25, 2026Post #521
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →