How does one include TR1?

后端 未结 6 1019
花落未央
花落未央 2021-02-03 22:58

Different compilers seem to have different ideas about TR1. G++ only seems to accept includes of the type:

#include 
#include 

        
6条回答
  •  南方客
    南方客 (楼主)
    2021-02-03 23:12

    Install boost on your machine.
    Add the following directory to your search path.

    /boost/tr1/tr1

    see here boost tr1 for details

    Now when you include you get the tr1 version of memory that has std::tr1::shared_ptr and then it includes the platform specific version of to get all the normal goodies.

提交回复
热议问题