What is the difference between using a struct with two fields and a pair?

后端 未结 6 600
刺人心
刺人心 2020-12-03 06:42

What is the difference regarding memory allocation and efficiency between using a struct with two fields and a pair?

6条回答
  •  孤城傲影
    2020-12-03 07:27

    No difference in terms of memory allocation or efficiency. In fact, in the STL implementation I am using pair is defined as struct pair

提交回复
热议问题