[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/ModuleWorks/taskflow/master/examples/nested_if_else.cpp [Back]  [Original]

// This program demonstrates how to create nested if-else control flow
// using condition tasks.
#include 

int main() {

  tf::Executor executor;
  tf::Taskflow taskflow;

  int i;

  // create three condition tasks for nested control flow
  auto initi = taskflow.emplace([&](){ i=3; });
  auto cond1 = taskflow.emplace([&](){ return i>1 ? 1 : 0; });
  auto cond2 = taskflow.emplace([&](){ return i>2 ? 1 : 0; });
  auto cond3 = taskflow.emplace([&](){ return i>3 ? 1 : 0; });
  auto equl1 = taskflow.emplace([&](){ std::cout 

Web Proxy Viewer  |  New URL  |  Original Page