Opened 8 years ago

#10063 new Patches

Option should exist to include ublas entirely from headers without linking to serialization

Reported by: Andrew Medlin <andrew@…> Owned by: Gunter
Milestone: Boost 1.56.0 Component: uBLAS
Version: Boost 1.55.0 Severity: Problem
Keywords: ublas serialization Cc:

Description

If you include certain ublas files which you wish to include as headers only without linking to prebuilt libs, you get link errors wanting to link to prebuild serialization library.

This problem occurred for example when I included the following in my application:

#include <boost/numeric/ublas/fwd.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/vector_sparse.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/storage_sparse.hpp>
#include <boost/numeric/ublas/banded.hpp>
#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/ublas/blas.hpp>
#include <boost/numeric/ublas/lu.hpp>

The attached patch introduces an option BOOST_UBLAS_DISABLE_SERIALIZATION which (if defined using a #define) excludes the serialization code.

The serialization code is unwanted on my platform for ublas objects, as the platform is obscure and difficult to build the serialization library for it.

Attachments (1)

boost_ublas_msvc8.patch (12.9 KB ) - added by Andrew Medlin <andrew@…> 8 years ago.
Patch to optionally exclude serialization from certain ublas classes. Also includes fix for "new" being defined in msvc 8 when including type_traits/has_new_operator.hpp

Download all attachments as: .zip

Change History (1)

by Andrew Medlin <andrew@…>, 8 years ago

Attachment: boost_ublas_msvc8.patch added

Patch to optionally exclude serialization from certain ublas classes. Also includes fix for "new" being defined in msvc 8 when including type_traits/has_new_operator.hpp

Note: See TracTickets for help on using tickets.