OneOfAType container — storing one each of a given type in a container — am I off base here?

前端 未结 2 1543
耶瑟儿~
耶瑟儿~ 2020-12-09 23:40

I\'ve got an interesting problem that\'s cropped up in a sort of pass based compiler of mine. Each pass knows nothing of other passes, and a common object is passed down the

2条回答
  •  眼角桃花
    2020-12-10 00:07

    You can create a hash or map of string to boost::any. The string key can be extracted from any::type().

提交回复
热议问题