lundi 20 janvier 2020

Why is a square bracket following with a curly bracket used? [duplicate]

I happen to meet with following code

int main(int argc, char *argv[]) {
  string model = argv[1];
  return xilinx::ai::main_for_video_demo(
      argc, argv,
      [model] {
        return xilinx::ai::Classification::create(model);
      },
      process_result, 2);
}

This code piece is found at Xilinx/Vitis-AI. I just do not understand what []{} means here, and what does it do to string model

Aucun commentaire:

Enregistrer un commentaire