Opened 12 years ago

#4440 new Bugs

MSVC doesn't work with bounded_vector's of size 0

Reported by: jesseperla@… Owned by: Gunter
Milestone: Boost 1.44.0 Component: uBLAS
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

A bounded_vector<double, 0> will not compile in MSVC9/10. It works fine in Intel 11.1 windows and MinGW.

In my generic programming, this comes up quite often. I added in a temporary hatch that changes the size of the allocated array to 1 if using MSVC. This doesn't seem to have caused any issues, but I don't know enough about alignment issues to see if it is a problem.

See the attached patch to the boost trunk and a boost test file. This patch works on MSVC10, Intel 11.1 MinGW4.5

Attachments (2)

test_boost_ublas_size_0.cpp (638 bytes ) - added by jesseperla@… 12 years ago.
size_0_vector_msvc.patch (503 bytes ) - added by jesseperla@… 12 years ago.

Download all attachments as: .zip

Change History (2)

by jesseperla@…, 12 years ago

Attachment: test_boost_ublas_size_0.cpp added

by jesseperla@…, 12 years ago

Attachment: size_0_vector_msvc.patch added
Note: See TracTickets for help on using tickets.