Coder Social home page Coder Social logo

Comments (12)

alecthomas avatar alecthomas commented on June 14, 2024

The main reason is so that C++11 standard library support is not a hard requirement, as some compilers/environments support C++11 language changes, but not the C++11 library.

However, I added conditional support for std::shared_ptr and boost::shared_ptr, and the same thing could be done for the remaining boost features, as there are stdlib equivalents for all the features used:

  • boost::function -> std::function
  • boost::unordered_map -> std::unordered_map (could probably removed altogether actually, and switched to a std::vector).
  • boost::bind -> std::bind
  • An equivalent to boost::noncopyable could be included inline.

To answer your question, I would definitely welcome a change that made boost support entirely optional in the same way as is already done for shared_ptr.

That said, I would probably also be fine with removing Boost support entirely and just dropping half baked environments. It would certainly clean up the code and CMake files.

from entityx.

acron0 avatar acron0 commented on June 14, 2024

Okay then, gonna attempt this at https://github.com/acron0/entityx/tree/no-boost 👍

from entityx.

acron0 avatar acron0 commented on June 14, 2024

The above branch is now complete and we're using it in production. Not sure what you want to do. Let me know if you want a pull request, otherwise the two can co-exist :)

from entityx.

alecthomas avatar alecthomas commented on June 14, 2024

Excellent, thanks. A PR would be great. A couple of questions:

  • What compiler are you building with?
  • Do the tests pass?

from entityx.

acron0 avatar acron0 commented on June 14, 2024

I haven't forgotten this. Will follow up when I am a bit less busy :)

from entityx.

alecthomas avatar alecthomas commented on June 14, 2024

No hurry, and thanks for the contribution!

from entityx.

tylersamples avatar tylersamples commented on June 14, 2024

The no-boost branch works on gcc 4.8.1 (Fedora 19). The tests fail to compile, however with them disabled it compiles.

Output of gcc and build failure

from entityx.

acron0 avatar acron0 commented on June 14, 2024

Gnomy is correct, it's just the tests I have failed to sort out. Looking at them today though.

from entityx.

acron0 avatar acron0 commented on June 14, 2024
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-2ubuntu1' --with-    bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr     --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-    included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --    with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-    object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-    checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) 

Running tests...
Test project /media/acron/projects/Projects/entityx/build
    Start 1: entity_test
1/5 Test #1: entity_test ......................   Passed    0.02 sec
    Start 2: event_test
2/5 Test #2: event_test .......................   Passed    0.00 sec
    Start 3: system_test
3/5 Test #3: system_test ......................   Passed    0.00 sec
    Start 4: tags_component_test
4/5 Test #4: tags_component_test ..............   Passed    0.00 sec
    Start 5: dependencies_test
5/5 Test #5: dependencies_test ................   Passed    0.00 sec

100% tests passed, 0 tests failed out of 5

Total Test time (real) =   0.06 sec

:)

Easier than I thought. Pushing now.

from entityx.

tylersamples avatar tylersamples commented on June 14, 2024

Can confirm. Tests compile and pass.

from entityx.

acron0 avatar acron0 commented on June 14, 2024

Alec, want me to PR?

from entityx.

alecthomas avatar alecthomas commented on June 14, 2024

Yes, please do!

from entityx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.