Compilation errors with VS 2017 15.3 and /permissive-
- Dominant language
- C++
- Stars
- 517
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
I have installed Visual Studio 2017 with latest updates (15.3) and Boost 1.65 RC3.
I am trying to use the `/permissive-` compiler switch that is supposed to make VS stick more closely to the C++ standard. However when I enable that switch I get the compilation errors from Boost.Geometry headers.
For the sample program
```
#define _HAS_AUTO_PTR_ETC 1
#include
int main(int, char*[])
{
}
```
I get the errors:
```
Unknown compiler version - please run the configure tests and report the results
c:\c++\libs-v140\boost_1_65_0\boost\geometry\algorithms\assign.hpp(236,1): error C2760: syntax error: expected ';' not '('
BOOST_MPL_ASSERT_MSG
^
c:\c++\libs-v140\boost_1_65_0\boost\geometry\algorithms\assign.hpp(253): note: see reference to class template instantiation 'boost::geometry::resolve_variant::assign' being compiled
};
c:\c++\libs-v140\boost_1_65_0\boost\geometry\iterators\concatenate_iterator.hpp(86,1): error C2760: syntax error: expected ';' not '('
BOOST_MPL_ASSERT_MSG((are_conv),
^
c:\c++\libs-v140\boost_1_65_0\boost\geometry\iterators\concatenate_iterator.hpp(147): note: see reference to class template instantiation 'boost::geometry::concatenate_iterator' being compiled
};
c:\c++\libs-v140\boost_1_65_0\boost\geometry\iterators\flatten_iterator.hpp(105,1): error C2760: syntax error: expected ';' not '('
BOOST_MPL_ASSERT_MSG((are_conv),
^
c:\c++\libs-v140\boost_1_65_0\boost\geometry\iterators\flatten_iterator.hpp(222): note: see reference to class template instantiation 'boost::geometry::flatten_iterator' being compiled
};
c:\c++\libs-v140\boost_1_65_0\boost\geometry\iterators\detail\segment_iterator\range_segment_iterator.hpp(156,1): error C2760: syntax error: expected ';' not '('
BOOST_MPL_ASSERT_MSG((are_conv), NOT_CONVERTIBLE, (types));
^
c:\c++\libs-v140\boost_1_65_0\boost\geometry\iterators\detail\segment_iterator\range_segment_iterator.hpp(206): note: see reference to class template instantiation 'boost::geometry::detail::segment_iterator::range_segment_iterator' being compiled
};
c:\c++\libs-v140\boost_1_65_0\boost\geometry\algorithms\is_convex.hpp(165,1): fatal error C1903: unable to recover from previous error(s); stopping compilation
static bool apply(Geometry const& geometry, geometry::default_strategy const&)
^
```
It seems to be related to the usage of `BOOST_MPL_ASSERT_MSG` of macro — though I am not sure if the problem comes from the macro itself or its usage within Boost.Geometry.
Contributor guide
Assessment
This issue has not been assessed yet.