Compilation problems VS2015.1

Issue #36 resolved
Adam Papoušek created an issue

Hi,

I get following errors when trying to compile a simple test program (see below):

...\blazetest\include\blaze/math/traits/MultTrait.h(150): error C2672: 'boost::type_of::encode_start': no matching overloaded function found

...\blazetest\include\blaze/math/traits/MultTrait.h(150): note: see reference to class template instantiation 'blaze::MultTrait<T1,T2,<unnamed-symbol>>::MultType' being compiled

...\blazetest\include\blaze/math/traits/MultTrait.h(162): note: see reference to class template instantiation 'blaze::MultTrait<T1,T2,<unnamed-symbol>>' being compiled

...\blazetest\include\blaze/math/traits/AddTrait.h(150): error C2672: 'boost::type_of::encode_start': no matching overloaded function found

...\blazetest\include\blaze/math/traits/AddTrait.h(150): note: see reference to class template instantiation 'blaze::AddTrait<T1,T2,<unnamed-symbol>>::AddType' being compiled

...\blazetest\include\blaze/math/traits/AddTrait.h(162): note: see reference to class template instantiation 'blaze::AddTrait<T1,T2,<unnamed-symbol>>' being compiled

...\blazetest\include\blaze/math/traits/DivTrait.h(150): error C2672: 'boost::type_of::encode_start': no matching overloaded function found

...\blazetest\include\blaze/math/traits/DivTrait.h(150): note: see reference to class template instantiation 'blaze::DivTrait<T1,T2,<unnamed-symbol>>::DivType' being compiled

...\blazetest\include\blaze/math/traits/DivTrait.h(162): note: see reference to class template instantiation 'blaze::DivTrait<T1,T2,<unnamed-symbol>>' being compiled

...\blazetest\include\blaze/math/traits/SubTrait.h(150): error C2672: 'boost::type_of::encode_start': no matching overloaded function found

...\blazetest\include\blaze/math/traits/SubTrait.h(150): note: see reference to class template instantiation 'blaze::SubTrait<T1,T2,<unnamed-symbol>>::SubType' being compiled

...\blazetest\include\blaze/math/traits/SubTrait.h(162): note: see reference to class template instantiation 'blaze::SubTrait<T1,T2,<unnamed-symbol>>' being compiled

I have Boost (ver. 1.60.0) directory in an environment variable BOOST_DIR, which is included using "Additional Include Directories" in VS. I kept the config as default.

You can download the VS solution here.

EDIT: error log with more info EDIT2: this is version 2.6, v2.5 works fine

Comments (9)

  1. Klaus Iglberger

    Hi Adam!

    Thanks a lot for making us aware of this issue. We will look into it and give you feedback as quickly as possible.

    Best regards,

    Klaus!

  2. Klaus Iglberger

    Dear Adam!

    Thanks again for pointing out this issue. We are able to reproduce the problem with VS 2015.1 and any Boost version. The problem appears to be a compiler bug in VS 2015.1 in combination with Boost.Typeof since the problem occurs even though no template gets instantiated (as demonstrated by your empty main() function).

    We will fix the problem in the repository as quickly as possible. However, it will unfortunately take a few days since we are in the middle of a major refactoring. Till then we hope it is ok for you to stick with Blaze 2.5. Please accept our apologies for the inconveniences.

    Best regards,

    Klaus!

  3. Klaus Iglberger

    We have fixed the problem and verified that Blaze now compiles with VS 2015.1. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.0.

    Please note that the solution requires the use of the C++11 feature decltype. Thus it is necessary to use the according C++11 compiler flag to be able to compile the code.

  4. Klaus Iglberger

    Hi David!

    The problem is the combination of VS 2015 and Boost.Typeof, which is used in Blaze 2.6. The fix for the issue has been pushed to the Bitbucket repository. This means that when you clone the repository you will get the latest development version of Blaze, which works with both VS 2015.1 and 2015.2.

    To circumvent the problem you have two options: First, you can clone the repository and work with the latest code. The advantage is that you could immediately use some of the new features of the next official release (see for instance #Issue 33 and #Issue 38). However, please note that since the fix uses the C++11 feature decltype you will have to switch on C++11 via compiler flag. Second, you can use Blaze 2.5, which doesn’t have this problem and wait for a few weeks for the next official release (Blaze 3.0).

    We are sorry for the inconveniences,

    Best regards,

    Klaus!

  5. David Helminiak

    Klaus,

    Thank you for your quick response! I have found Blaze 2.5 to be sufficient for my project's needs and am looking forward to 3.0's release. Thanks again.

  6. Log in to comment