Using Boost unordered_map

前端 未结 2 1433
长情又很酷
长情又很酷 2020-12-19 18:52

I want to include boost::unordered_map in my project without downloading the whole Boost package. How can I do that?

2条回答
  •  天命终不由人
    2020-12-19 19:26

    You need at least headers because Boost packages depend on each other. You might want to select only needed header files but it will really be pain in the neck and will take you many hours. The algorithm is:

    1. Include only boost/unordered_map.
    2. While preprocessor complains about header that is not found:
      • Add that header.
      • Recompile.

    You will end up with only necessary headers. But I can't see any advantages of this solution.

提交回复
热议问题