Why does Boost `bcp smart_ptr dir /` copy 6 MB of source code?

So, I wanted to separate only smart pointers from boost for use in my project, and I was asked to use a utility bcp.

Today I compiled it and did it bcp smart_ptr to_copy_to_my_project/.

Result: 6 MB of code in the directory to_copy_to_my_project/.

Are you kidding? I do not want to add 6MB header files to my 100KB project to use smart pointers.

For example, it copies the following win32 file (I am on Linux):

Copying file: boost/thread/win32/basic_timed_mutex.hpp
Copying file: boost/thread/win32/condition_variable.hpp
Copying file: boost/thread/win32/interlocked_read.hpp

Why should I copy win32 files using smart_ptr when I am on Linux?

also:

Copying file: boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp
...
Copying file: boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp
...
Copying file: boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp

and

Copying file: boost/date_time/adjust_functors.hpp

Why is smart_ptr dependent on date_time?

Also, as for all of these tests, which he copied:

Copying file: libs/smart_ptr/test/allocate_shared_esft_test.cpp
...

I do not need it! I just need smart_ptr!

- ? 6 , 10 20 ...

, .

+3
5

smart_ptr, #define 'ing BOOST_SP_USE_QUICK_ALLOCATOR ( ), :

boost/assert.hpp
boost/checked_delete.hpp
boost/config.hpp
boost/config/compiler/*
boost/config/no_tr1/functional.hpp
boost/config/no_tr1/memory.hpp
boost/config/no_tr1/utility.hpp
boost/config/platform/*
boost/config/posix_features.hpp
boost/config/select_compiler_config.hpp
boost/config/select_platform_config.hpp
boost/config/select_stdlib_config.hpp
boost/config/stdlib/*
boost/config/suffix.hpp
boost/config/user.hpp
boost/current_function.hpp
boost/detail/interlocked.hpp
boost/detail/sp_typeinfo.hpp
boost/detail/workaround.hpp
boost/enable_shared_from_this.hpp
boost/exception/detail/attribute_noreturn.hpp
boost/exception/exception.hpp
boost/memory_order.hpp
boost/non_type.hpp
boost/shared_ptr.hpp
boost/smart_ptr/*
boost/throw_exception.hpp
boost/type.hpp

365k, boost/smart_ptr. boost/config . , , boost/config/compiler, boost/config/platform boost/config/stdlib. boost/smart_ptr.

+1

stl: std::tr1::shared_ptr, "" boost::shared_ptr.

0

, win32- - , , . , , smart_ptr , boost:: shared_ptr <Foo> boost:: shared_ptr < const Foo > , . , , , , boost.

, Linux, ?

0

, boost , . #ifdef: ed away bcp , .

, . , .

, , ++ tr1, std:: tr1:: shared_ptr.

, 6Megs - , / , , , .

0

bcp will copy a lot less if you do

bcp shared_ptr.hpp to_copy_to_my_project/.

I think it's too much, I agree.

0
source

Source: https://habr.com/ru/post/1759682/


All Articles