What exactly does the keyword 'template' mean?

Revision en2, by jagerknight, 2022-01-26 15:29:41

Recently, I wrote a recursive solution for a CSES DP problem and while doing so, there was a typo(The text predictor of CLion corrected emplace to template) and I did not notice this.

However it still compiled without errors and when I submitted it in CSES, it got accepted. I have attached a screenshot and the code below.

I thought there will be some compilation error or some error that will be thrown when this happened, but nothing happened.

Could anyone please tell me why?

Thanks in advance!

Code

The accepted page

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English jagerknight 2022-01-26 15:32:31 73
en3 English jagerknight 2022-01-26 15:31:13 79 Tiny change: 'ee/)\n\n![The accepted page](https://' -> 'ee/)\n\n![ ](https://'
en2 English jagerknight 2022-01-26 15:29:41 95 Tiny change: '3488ee/)\n' -> '3488ee/)\n\n![The accepted page](https://imgur.com/a/zae6QoI)\n\n' (published)
en1 English jagerknight 2022-01-26 15:27:44 605 Initial revision (saved to drafts)