Using Boost unordered_map

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

+3
source share
2 answers

Use bcp : http://www.boost.org/doc/libs/1_52_0/tools/bcp/doc/html/index.html

 cd $BOOST_DIR bcp unordered_map /tmp/TEST 

Now / tmp / TEST contains only the things needed for unordered_map , in my case 15Mb (unlike 734Mb for the full acceleration library)

+6
source

You need at least headers because Boost packages are dependent on each other. You can select only the necessary header files, but it will really be a pain in the neck and will take you many hours. Algorithm:

  • Enable only boost/unordered_map .
  • So far, the preprocessor complains about a header that is not found:
    • Add this title.
    • Recompiled.

As a result, you will get only the necessary headers. But I do not see any advantages of this solution.

0
source

All Articles