boost library

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • boost library

      I dont know if you guys have heard of this or used it, but the boost C++ library is just absolutely amazing. It's a templated library, something like the STL, but also has some libraries that are not templated. I havent gone through the whole book yet (Game Coding Complete), Im upto ch3. And I can tell you that many of the things dicussed in chapter 3, namely SmartPtr<T> (boost::shared_ptr<T>/boost::weak_ptr<T>/More), Optional<T> (boost::optional<T>), Lexx/Yacc/Script (boost::spirit) stuff, Python (boost::python) , Random (boost::random*) number generation is all already there in the boost library. You guys have to check it out. And they have an amazing functor library (boost::function and boost::bind). Cross platform threading, filesystem, memory pools, tokenizers. Oh and by the way, it's all cross platform stuff.

      If you dont have it, I suggest you get it. Im wondering if it's widely used in the industry as well? Mr.Mike?
    • RE: boost library

      Hrm....it may be really cool - but after looking at the site I think some game companies might shy away from using it because it's not clear who owns the libraries, and whether or not the code on that site really is free and clear of any "encumberances."

      I mean - it would really suck if you used boost in a commercial product, only to find out that a portion of the library is owned and licensed by someone else. Then you'd have to pay royalties...

      Yieee.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Just checked out the licensing stuff. It seems that every library that is submitted to boost and becomes part of boost must follow the following licening requirements:

      1 Must be simple to read and understand.
      2 Must grant permission without fee to copy, use and modify the software for any use (commercial and non-commercial).
      3 Must require that the license appear on all copies of the software source code.
      4 Must not require that the license appear with executables or other binary uses of the library.
      5 Must not require that the source code be available for execution or other binary uses of the library.
      6 May restrict the use of the name and description of the library to the standard version found on the Boost web site.

      So as for the free part, from the above, any library submitted to boost MUST be free (point number 2). as for free of "encumberances" (hold on, let me look that word up...), The way I understand it is that the libraries are infact owned by the actual people that submitted them, but all you need to do is leave their copyright notices intact in their source files to use them for free wherever you want.
    • Yeah, I read the same thing.

      But - let's say someone uploaded some source code to boost that wasn't theirs, and lets say it actually belonged to me.

      If anyone used boost for commercial purposes I could sue them, the person that uploaded my code, and anyone connected to boost.

      Don't get me wrong - I think boost is a great thing, but since there's nothing on the boost site that indemnifies any user of boost from being liable for using "boosted" code, I'd keep it solidly in the non-commercial area.

      But - I'm not a lawyer, so I'd double check with your own attourney before using it commercially.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Originally posted by poridge
      ah yeah, didnt think of it that way.


      I wonder if the makers of Boost have. Surely they could add a disclaimer so that the person submitting the code bares the repercussions of any copyright infringements and then they could just remove the code from all future versions of the library if a infringement is found. Would this work??? It seems like it would, but I too am not a copyright attorney.
    • About the only thing tha makers of boost could do is indemnify themselves, saying that the users of boost take all the risks.

      The crux of the matter is being in the position of having used boost in a AAA title, making millions of dollars, only to find out that a portion of boost actually belonged to, say, Sun Microsystems or Microsoft. You'd be up the creek, and you'd be looking at making an expensive settlement.

      Here's the basic rule - if you can't be 100% sure where your raw materials are coming from, and under what conditions you may use them, then keep looking and don't take risks.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Looking through the Boost website, I did find this. It's Boost's license requirements for licenses placed on submitted libraries.


      License requirements
      - Must be simple to read and understand.
      - Must grant permission without fee to copy, use and modify the software for any use (commercial and non-commercial).
      - Must require that the license appear on all copies of the software source code.
      - Must not require that the license appear with executables or other binary uses of the library.
      - Must not require that the source code be available for execution or other binary uses of the library.
      - May restrict the use of the name and description of the library to the standard version found on the Boost web site.


      Judging from that, it seems the people who approve of libraries for inclusion in the overall Boost library look carefully at the licenses of the individual libraries and make sure there aren't any sort of restraints with regards to fees for use in commercial products. It would seem to me that Boost could be freely used in any other project without worries.
    • RE: boost library

      Yes - I'm replying to my own post. How wierd is that???

      Anyway - one of the coolest parts of boost is the smart pointer stuff - especially shared_ptr and weak_ptr.

      In fact - this stuff is SO cool I think it can replace the SmartPtr I use in the GameCode source. SmartPtr is pretty easy to understand, but it has a HUGE drawback in its lack of polymorphism.

      I'm about to publish a new release of the GameCode source - and I'd like to use the boost smart_ptr instead of SmartPtr. Any objections????
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • RE: boost library

      Originally posted by mrmike
      and I'd like to use the boost smart_ptr instead of SmartPtr. Any objections????


      Perhaps if the Boost version is harder to understand, then you should include it but leave the origional.
    • Actually, it is a great idea.

      I couldn't find any clear examples of using boost::shared_ptr and boost::weak_ptr, and hesistate to join their mailing list just to ask a single, "newbie" question.

      Beside, if I am not wrong, there are the problems of cyclic dependecies using SmartPtr, which the combination of shared_ptr and weak_ptr solves.

      But there's one question - is the boost smart pointers polymorphic, across compliers like VC++ 6? If so, how did they do it? The Boost library is open-source, AFAIK - can't we look at how they achieve polymorphic smart pointers?
      Act in haste and repent at leisure.
      Code too soon and debug forever.