Comments
yourfanat wrote: I am using another tool for Oracle developers - dbForge Studio for Oracle. This IDE has lots of usefull features, among them: oracle designer, code competion and formatter, query builder, debugger, profiler, erxport/import, reports and many others. The latest version supports Oracle 12C. More information here.
Cloud Expo on Google News
SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
What Is Boost? Boost Your C++ Programming With The Boost Libraries
For C++ programmers all over the world, Boost and the Boost libraries have become indispensable

For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.

It all started in 1998 when Beman Dawes, a member of the C++ Standards Committee, founded Boost as a proving ground for new C++ libraries. C++ and the C++ Standard Library had just become standardized in ISO/IEC 14882-98, but that didn't mean that the work was done. So a community was formed and right from the start Boost managed to attract luminaries who shared the idea that Open Source C++ libraries were key to the future success of C++ and that they needed to be proven in the field before being proposed for inclusion in the standard. Today the success of Boost is apparent when you look at the contents of TR1 (the first technical report containing C++ library extensions). Almost all of the libraries come from Boost. Those libraries include support for regular expressions, a type traits library, random number generation, tuples, and smart pointers.

With 60 libraries to choose from, it's helpful to see some examples of Boost's contents. One of the most widespread and popular libraries is Boost.Smart_ptr, a collection of smart pointers that make resource handling in C++ much less error prone. Another of my favorites is Boost.Bind, which creates function objects, optionally with bound arguments. When using the STL, Bind is a lifesaver that lets you create function objects on-the-fly. Boost.Regex brings regular expressions to C++, and supports both Perl-like expressions and the regex flavors from awk, grep, egrep, and emacs. For variant data types, there are two libraries in Boost: Boost.Any for unbounded variants and Boost.Variant for creating variants supporting a bounded set of types. For handling date and time calculations, there's Boost.Date_time. There's a portable threading library available called Boost.Thread. A compile-time analogue to the STL is available through Boost.Mpl, a library that makes the world of compile-time programming available even to us mortals. For manipulating mathematical graphs, there's Boost.Graph, which includes graph components and algorithms such as Dijkstra's shortest path, A* search, and topological sort. For delayed functions, there's a library called Boost.Function. If you need flexible callbacks, i.e., signals and slots, there's Boost.Signal. Do you need some string-related algorithm that's not available in the C++ Standard Library? See if Boost.String_algo has got what you need. Are you tired of platform-specific hacks for working with files and directories? Try Boost.Filesystem.

As you can see, the Boost libraries cover a wide range of domains. Visit www.boost.org for a complete listing, and while you're there, why not download the libraries? They're expertly designed, thoroughly tested, well documented, and free of charge.

The Boost libraries are released under the Boost License - or a license that complies with the Boost license requirements - and they are free for both commercial and non-commercial use. The big differences when compared with the GNU General Public License (GPL) are that derivative works don't have to release their source code, and that the Boost license only affects the Boost libraries, whereas the GPL also affects the code that uses GPL'd libraries. The relaxed license exists both for philosophical and practical reasons; and because Boost libraries often aim for inclusion in the C++ standard, they have to be free.

Boost is popular both in commercial and non-commercial projects, and is being used more and more in Linux distributions. Currently Boost comes bundled with Fedora, Debian, and NetBSD. Of course, the libraries are also available for download from www.boost.org. You'll also find that many best practices books are starting to talk about the Boost libraries and recommend that you use them, for example Scott Meyers' Effective C++.

There are several books of interest for anyone wanting to learn more about Boost. The first book published about Boost was The Boost Graph Library User Guide and Reference Manual, which, true to its name, talks about the ins and outs of the Graph library. Then came C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond about template metaprogramming with the fantastic Mpl library. Finally, there's the recently published Beyond the C++ Standard Library: An Introduction to Boost, written by yours truly. The book briefly outlines all the Boost libraries, and provides in-depth coverage of 12 important ones. I hope that we'll see many more books about Boost in the future.

It's worth noting that the online documentation for the Boost libraries is very good.

I know that you're eager to see some code now, and I've chosen a short example program from my Boost book that shows how to use Boost.Regex to change the British spelling of the word "colour" to the American "color". The problem, of course, is that you have to account not only for the word "color," but "colors," "colorize," and so on:

#include <iostream>
#include <string>
#include "boost/regex.hpp"

void main() {
boost::regex reg("(Colo)(u)(r)",
boost::regex::icase|boost::regex::perl);

std::string s="Colour, colours, color, colourize";
s=boost::regex_replace(s,reg,"$1$3");
std::cout << s;
}

First we create a regular expression of type boost::regex, which holds the regex. It's a case-insensitive expression. The regex simply captures the word "colour" in three marked sub-expressions, which we need in order to surgically remove the letter "u" (the second sub-expression). Then, we apply the algorithm regex_replace() on a std::string, and use the format string $1$3, which corresponds to the first and third sub-expressions of the regex; here, everything but the letter "u." Finally, the modified string, s, is printed to std::cout to demonstrate that all traces of the British spelling are gone. That's just a short example to display some of the power of Boost.Regex. If you want more, I think you know what you need to do.

Before concluding this article, I'd like to tell you a little more about what's new at Boost. There are several libraries waiting in the review queue, which means that they've passed the first hurdle, which is to create interest among the Boosters. Of course, for a library to be submitted to Boost, it has to be more than just interesting and useful; it must be a complete package of software adhering to the Boost guidelines, and it must come with documentation. For any library to become accepted by Boost, it must undergo peer review. Let's take a quick look at some libraries that have recently been accepted into Boost. Boost.Foreach is a very handy macro that makes it simple to loop over the elements of all kinds of collections; Boost.Typeof provides an approximation of the forthcoming (and long-awaited!) language support for auto and typeof, which are mechanisms for querying the type of an expression; Boost.Statechart is a powerful library for creating finite state machines; Boost.Xpressive is a regular expression template library - essentially a bridge between regular expressions (see Boost.Regex) and the parser generator framework (see Boost.Spirit). If you're interested in knowing more about these libraries and other potential additions to Boost - and perhaps propose your own for inclusion - you'll want to join the Boost mailing lists, which are also accessible through newsgroup interfaces.

Only the future will tell which new libraries will make it into Boost, but rest assured that lively discussions on new potential additions to Boost will always be common on the mailing lists.

I hope that this introduction to Boost has whetted your appetite for this interesting community and collection of useful C++ libraries. I also hope to see you at www.boost.org and on the Boost mailing lists.

I'll leave you with a quote from Bjarne Stroustrup in an interview by Bill Venners. The topic was C++ programming styles, and the question was how to elevate one's level of programming, or, wittily, "how to climb above C-level":

"To get out of writing low-level code, you needn't start writing a lot of classes. Instead, start using facilities provided in libraries."

References

________

About Björn Karlsson
Björn Karlsson works as a senior software engineer at ReadSoft, where he spends most of his time designing and programming in C++. He has written a number of articles about C++ and the Boost libraries for publications such as "C/C++ Users Journal," "Overload," and the online journal "The C++ Source." His first book, Beyond the C++ Standard Library: An Introduction to Boost, was published by Addison-Wesley this year.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Nice Post....

What Is Boost? Boost Your C++ Programming With The Boost Libraries. For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.

What Is Boost? Boost Your C++ Programming With The Boost Libraries. For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.

What Is Boost? Boost Your C++ Programming With The Boost Libraries. For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.


Your Feedback
SYS-CON Australia News Desk wrote: What Is Boost? Boost Your C++ Programming With The Boost Libraries. For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.
SYS-CON Canada News Desk wrote: What Is Boost? Boost Your C++ Programming With The Boost Libraries. For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.
LinuxWorld News Desk wrote: What Is Boost? Boost Your C++ Programming With The Boost Libraries. For C++ programmers all over the world, Boost and the Boost libraries have become indispensable. Weighing in at 60 C++ libraries, Boost is a large collection of peer-reviewed code covering a wide range of domains. But why should you care about that? Well, because Boost can quickly become indispensable for you too.
Latest Cloud Developer Stories
The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long development cycles that produce software that...
European data center operator DEAC is the largest in the Baltics. The activities are orientated to provide data center services and IT outsourcing on Eurasia and America scale in order to create the primary or backup or additional data center for customer in the EU, to protect it...
All major researchers estimate there will be tens of billions devices – computers, smartphones, tablets, and sensors – connected to the Internet by 2020. This number will continue to grow at a rapid pace for the next several decades. With major technology companies and startups ...
The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long development cycles that produce software that...
Organizations today increasingly rely on Application Performance Management (APM) tools like New Relic to respond to end user complaints, and to track system latency and other key application metrics. With this data, users can often confirm if the application is running slowly an...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021



SYS-CON Featured Whitepapers
ADS BY GOOGLE

Breaking Cloud Computing News

NEW YORK, Sept. 30, 2014 /PRNewswire/ -- ARK Investment Management (ARK) is pleased to announce t...