boost

Discriminated Unions with boost::python and boost::variant - The Blind Guru

A useful application of boost::variant with boost::python by Mario Lang.

boost::python and boost::variant

by Mario Lang

From the post:

However, there is one aspect of C++ data types that I couldn't figure out how to interface with Python, which are C++ discriminated unions, or more specifically, heterogeneous containers. While Python has no problems with containers containing objects of different types, C++ does not make this very easy by default.

A gotcha with ptr_vector -- Andrzej Krzemieński

Do you know Boost.Pointer Container? Andrzej gives some useful information in his recent blog entry:

A gotcha with ptr_vector

He gives answers to these questions:

What would you use boost::ptr_vector for? Why would you need to have a vector of pointers, which you want to delete yourself? Is it because:

  1. You want the objects to remain at the same address even if you re-allocate the array under the vector?
  2. You want to inter-operate with a library that already deals with owing pointers?
  3. You want it to be faster than if you were storing values in std::vector?
  4. You want the “polymorphic behavior” of your objects?

A gotcha with Boost.Optional --Andrzej Krzemieński

Have you used the Boost.Optional library? There is one thing you might need to keep an eye on as explained by Andrzej.

  A gotcha with Optional

  by Andrzej Krzemieński

From the article:

This post is about one gotcha in Boost.Optional library. When starting to use it, you might get the impression that when you try to put optional<T> where T is expected, you will get a compile-time error. In most of the cases it is exactly so, but sometimes you may get really surprised...

ODE simulations with Boost.odeint and Boost.SIMD

A very nice article on how to use boost::odeint and SIMD:

Boosting ODE simulations with Boost.odeint and Boost.SIMD

by Mario Mulansky

From the article:

Ordinary Differential Equations appear in numerous applications and finding their solution is a fundamental problem in science and engineering. Often one has to rely on numerical methods to approximate such solutions as in the presence of nonlinearities, no analytic solution can be found. Being such a frequent problem...

C++ and Zombies: a moving question

One of the issues I was thinking about since C++Now: move and move-destruction

C++ and Zombies: a moving question

by Jens Weller

From the article:

This has been on my things to think about since C++Now. At C++Now, I realized, that we've might got zombies in the C++ standard. And that there are two fractions, one of them stating, that it is ok to have well defined zombies, while some people think that you'd better kill them.

Insights into new and C++

I've written down some basic thinking on new and new standards:

Insights into new and C++

by Jens Weller

From the article:

Every now and then, I've been thinking about this. So this blogpost is also a summary of my thoughts on this topic, dynamic memory allocation and C++. Since I wrote the blog entries on smart pointers, and C++14 giving us make_unique, raw new and delete seem to disappear from C++ in our future code...

Boost 1.56.0 is released

Some welcome news from Boost.org...

Boost 1.56.0 has been released

These open-source libraries work well with the C++ Standard Library, and are usable across a broad spectrum of applications.
The Boost license encourages both commercial and non-commercial use.

This release contains one new library and numerous enhancements and bug fixes for existing libraries.

This is the first release since November of last year, and the last one since Boost migrated from a monolithic Subversion repository to modularized git repositories on github.com. The end users should see no change though, since the archives have the same layout as previous releases.

Read the full announcement for all the details, and for download links.

A video interview with Michael Wong

At C++Now this and last year I recorded a short interview with Michael Wong:

A video interview with Michael Wong

The interview as a youtube playlist

by Jens Weller

From the Article:

I've started last year a video interview in Aspen - while at C++Now - with Michael Wong. This year I had the chance to finish the interview and I am now finally able to release it. Michael is a member of the C++ Committee for many years, he leads the Canadian delegation and also speaks for IBM at the C++ committee.

Boost 1.56.0 beta 1 released

Boost release 1.56.0 beta 1 is now available from SourceForge

This release contains 2 new libraries:

  • Align: Memory alignment functions, allocators, and adaptors, from Glen Fernandes.
  • Type_Index: Runtime/Compile time copyable type info, from Antony Polukhin.

Modularization

Boost version control has migrated to a system using git submodules. This shouldn't make too much of a difference to users, although the directory structure is now a bit different.

Parts of some libraries have been moved into different modules, and several new modules have been extracted from existing code. All header paths should remain the same.

The new modules are:

  • Assert: Customizable assert macros. Maintained by Peter Dimov.
  • Core: Core utilities used by other libraries, with minimal dependencies. Maintained by Peter Dimov, Glen Fernandes and Andrey Semashev.
  • Lexical_Cast: General literal text conversions, such as an int represented a string, or vice-versa, from Kevlin Henney.
  • Throw_Exception: A common infrastructure for throwing exceptions from Boost libraries, from Emil Dotchevski.
  • Winapi: Windows API declarations without <windows.h>, for internal Boost use.

For details of what's in the release, see http://www.boost.org/users/history/version_1_56_0.html.


Note that the links to files on this web page are for the final release - use the SourceForge link above to get the beta files.

Please download the beta, give it a try. If you encounter any problems, please report them on the boost mailing list.

Masking a Class in Boost.Graph -- Vadim Androsov

Here's an experience report about using Boost's graph support in an existing game app, with some notes about Boost Concepts:

Masking a Class in Boost Graph. Part 1: Let the Interface Be

Masking a Class in Boost Graph. Part 2: Completing the Implementation of Concept Support

by Vadim Androsov

From the articles:

I had to rebuild a pathfinding algorithm for our game recently. The previous one (Boost Concepts) was bad as any sidestep was dangerous. So I wanted to take a ready algorithm from a good source. That’s exactly when I remembered about boost as there’s functionality for working with graphs. Unfortunately “find a function, call it and everything will work” approach wasn’t meant to be realized. The library is focused on the maximum use flexibility which has badly affected its simplicity. But it’s better than creating it from scratch (then fixing it). I didn’t want to bother with other libraries, while boost has already been used in the project. ...