Opened 8 years ago

Last modified 8 years ago

#9954 new Bugs

[ublas] fixed_vector<> broken for msvc-12.0

Reported by: awulkiew Owned by: Gunter
Milestone: To Be Determined Component: uBLAS
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

fixed_vector<> is broken on msvc-12.0 due to the use of constexpr. This heyword is not suported by this compiler.

BOOST_UBLAS_CPP_GE_2011 macro is used to enable/disable the whole class (wrongly on msvc-12.0) instead of enabling only some parts of the code as it's done in other libraries.

Another thing is that fixed_vector<> is only available on some compilers which allows the users to write non-portable code.

Variadic templates may be emulated with Boost.Preprocessor, e.g. see how emplace_back() is implemented in boost::container::vector<> :

https://github.com/boostorg/container/blob/develop/include/boost/container/vector.hpp lines 1309-1380.

constexpr may be conditionally used e.g. by one of macros defined in Boost.Config:

http://www.boost.org/doc/libs/1_55_0/libs/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_allow_use_of_c__11_features_with_c__03_compilers

Change History (1)

comment:1 by anonymous, 8 years ago

This should have been resolved in the newest version.

Note: See TracTickets for help on using tickets.