Boost logo

Boost Users :

From: Ran Regev (regev.ran_at_[hidden])
Date: 2023-04-03 13:51:08


Hi,

The file in the subject fails to compile under MSVC 2022.
Does someone have any idea why and how to fix it?

Details:

This file:
boost_1_81_0\libs\compute\test\test_constant_iterator.cpp

With these errors:

Build started...
1>------ Build started: Project: BoostTests, Configuration: Debug x64 ------
1>test_constant_iterator.cpp
1>C:\Externals\boost_1_81_0\boost\compute\iterator\constant_iterator.hpp(114,17):
error C2440: 'return': cannot convert from 'const T' to 'int &'
1> with
1> [
1> T=int
1> ]
1>C:\Externals\boost_1_81_0\boost\compute\iterator\constant_iterator.hpp(114,17):
message : Conversion loses qualifiers
1>C:\Externals\boost_1_81_0\boost\compute\iterator\constant_iterator.hpp(112,1):
message : while compiling class template member function 'int
&boost::compute::constant_iterator<int>::dereference(void) const'
1>C:\Externals\boost_1_81_0\boost\iterator\iterator_facade.hpp(550,11):
message : see reference to function template instantiation 'int
&boost::compute::constant_iterator<int>::dereference(void) const' being
compiled
1>C:\Externals\boost_1_81_0\libs\compute\test\test_constant_iterator.cpp(30,59):
message : see reference to class template instantiation
'boost::compute::constant_iterator<int>' being compiled
1>Done building project "BoostTests.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 4:39 PM and took 03.713 seconds ==========

Ran.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net