kestion about boost

This is a discussion on kestion about boost within the C++ Programming forums, part of the General Programming Boards category; What is boost for?...

  1. #1
    Banned
    Join Date
    Dec 2008
    Location
    Maputo, Mozambique
    Posts
    82

    kestion about boost

    What is boost for?

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Uh, for programming in C++?

    You could look at the website:
    Boost provides free peer-reviewed portable C++ source libraries.

    We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications.
    Here's a sort of About page: http://www.boost.org/users/
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Boost is a collection of libraries from different areas. I think they can be divided into five big groups:

    1) Meta-libraries: these libraries concern meta-programming, especially the writing of other libraries. As an application programmer, you'll rarely need them. These are e.g. the MPL, the Preprocessor library, Parameter, and Proto.

    2) Basic utilities: small, very widely applicable utilities. Extremely useful. Examples are the smart pointers, tuple, optional, and string_algo.

    3) System integration libraries: provide cross-platform access to system services. Very useful when you need this service. Examples are Filesystem, Asio, Threads, and Interprocess.

    4) General-purpose libraries: bigger than the small utilities, they have a steeper learning curve. Still, they can be applied to many problems. Examples are the pointer containers, the iterator library, Date/Time, and Exception.

    5) Special-purpose libraries: these are not so widely applicable, but in their domain they make things a lot easier. Often very big and complicated. Examples are Graph, Spirit, GIL, and Units.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Banned
    Join Date
    Dec 2008
    Location
    Maputo, Mozambique
    Posts
    82
    Ok so in other words it is something that someone should probably not learn unless they want to teach C++, right?

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by c++0x View Post
    Ok so in other words it is something that someone should probably not learn unless they want to teach C++, right?
    I think you have that backwards. I teach C++, so I don't know Boost very well because (1) I try to stick to standard stuff and (2) there's only so far you can get in three credit hours. On the other hand, if you plan to actually use C++ at all, well then.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    No, it's a bunch of useful libraries.

    A lot of the additions in C++-0x comes from Boost, too.

    Think of it as "extended C++ standard library". It's like a testbed for proposed additions to standard C++.

  7. #7
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Or for someone that wants to program in C++. They have a lot of useful functions so why not use them? For example, you ask a question here and somebody tells you you can use boost:thisFunction. You search it and you learn it. You might want to use boost threads, so you read them and use them. No need to learn everything, just whatever you need.

    Generally, they are very good and reliable libraries so learning them will sure be useful. You cannot do everything with only the standard libraries

  8. #8
    Banned
    Join Date
    Dec 2008
    Location
    Maputo, Mozambique
    Posts
    82
    How much Boost stuff will be added into the STL?

  9. #9
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Boost stuff won't be added into the STL (standard template library) as far as I am aware; rather, I think it will go into a new namespace called tr1. http://en.wikipedia.org/wiki/Technical_Report_1

    Also see http://www.boost.org/doc/libs/1_34_0...boost_tr1.html
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  10. #10
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Dunno if they are directly from boost, but tuples will be added. Threads as well. I believe also smart pointers, or am I wrong?

  11. #11
    Banned
    Join Date
    Dec 2008
    Location
    Maputo, Mozambique
    Posts
    82
    My wife made me go to tuples counseling once. I did not like it. I do not fully understand what a smart pointer is for. Will they completely remove the ability to use normal pointers in C++!?

  12. #12
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    No, they won't. Don't really know what they are either.
    Tuples are simple. Think of them as a pair of values. Other languages let you use them directly with (val1, val2) syntax.
    If you do this tuple1 = tuple2 then you have tuple.val1 = tuple.val1, tuple.val2 = tuple.val2

    Think of when you want to return 2 values. You return a tuple and do your job simple

  13. #13
    Banned
    Join Date
    Dec 2008
    Location
    Maputo, Mozambique
    Posts
    82
    I don't see how that is a hugely beneficial addition to the language, but I am sure someone will argue that it is. It opens the door to "We need to have a function that returns 16 values!"

  14. #14
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by dwks View Post
    Boost stuff won't be added into the STL (standard template library) as far as I am aware; rather, I think it will go into a new namespace called tr1. http://en.wikipedia.org/wiki/Technical_Report_1
    TR1 was a testbed for the next standard, in a way. A set of libraries with a specified interface that implementors were encouraged to add to their compilers.
    With C++0x, most of these are upgraded to full standard library status (sometimes with modifications) and moved from the std::tr1 to the std namespace.

    Quote Originally Posted by c++0x View Post
    I don't see how that is a hugely beneficial addition to the language, but I am sure someone will argue that it is. It opens the door to "We need to have a function that returns 16 values!"
    std::map::insert and std::set::insert return two values. Tuple is just a more generic variant of std:air: std:air has two values, tuples can have any number of values.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #15
    Banned
    Join Date
    Dec 2008
    Location
    Maputo, Mozambique
    Posts
    82
    Interesting. I wonder if any of the members here are part of the standards committee. Then we could know which things will make the cut before the rest of the world

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Boost Auto-Linking
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 12-30-2007, 05:11 AM
  2. Boost Serialization: shared_ptr
    By KessiMC in forum C++ Programming
    Replies: 0
    Last Post: 12-26-2007, 07:17 PM
  3. Replies: 2
    Last Post: 12-12-2007, 05:45 AM
  4. building boost iostreams
    By l2u in forum C++ Programming
    Replies: 3
    Last Post: 04-14-2007, 02:29 PM
  5. Integrating Boost with STLPort
    By Mario F. in forum Tech Board
    Replies: 1
    Last Post: 11-11-2006, 05:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21