这都是什么错误

将版本v142改成v140就出现了这个问题

1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(405): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(406): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(413): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(414): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(415): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(495): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(500): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(500): note: 请参见“--”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(502): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(502): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(503): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(503): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(504): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(504): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(505): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(505): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(506): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(506): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(508): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(508): note: 请参见“++”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(493): error C3259:constexpr”函数只能有一个 return 语句
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(515): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(520): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(520): note: 请参见“--”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(522): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(522): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(523): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(523): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(524): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(524): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(525): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(525): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(526): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(526): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(527): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(527): note: 请参见“|=”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(529): error C3249:constexpr”函数的语句或子表达式非法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(529): note: 请参见“++”的用法
1>D:\Cgal\cmake\boost_1_82_0\output\vc14.2-x64\include\boost-1_82\boost/core/bit.hpp(513): error C3259:constexpr”函数只能有一个 return 语句

出问题的都是类似这种
x = x - ( ( x >> 1 ) & 0x55555555 );

BOOST_CXX14_CONSTEXPR inline int popcount_impl( boost::uint32_t x ) BOOST_NOEXCEPT
{
    x = x - ( ( x >> 1 ) & 0x55555555 );
    x = ( x & 0x33333333 ) + ( ( x >> 2 ) & 0x33333333 );
    x = ( x + ( x >> 4 ) ) & 0x0F0F0F0F;

    return static_cast<unsigned>( ( x * 0x01010101 ) >> 24 );
}
BOOST_CXX14_CONSTEXPR inline int popcount_impl( boost::uint64_t x ) BOOST_NOEXCEPT
{
    x = x - ( ( x >> 1 ) & 0x5555555555555555 );
    x = ( x & 0x3333333333333333 ) + ( ( x >> 2 ) & 0x3333333333333333 );
    x = ( x + ( x >> 4 ) ) & 0x0F0F0F0F0F0F0F0F;

    return static_cast<unsigned>( ( x * 0x0101010101010101 ) >> 56 );
}
BOOST_CXX14_CONSTEXPR inline boost::uint32_t bit_ceil_impl( boost::uint32_t x ) BOOST_NOEXCEPT
{
    if( x == 0 )
    {
        return 0;
    }

    --x;

    x |= x >> 1;
    x |= x >> 2;
    x |= x >> 4;
    x |= x >> 8;
    x |= x >> 16;

    ++x;

    return x;
}

BOOST_CXX14_CONSTEXPR inline boost::uint64_t bit_ceil_impl( boost::uint64_t x ) BOOST_NOEXCEPT
{
    if( x == 0 )
    {
        return 0;
    }

    --x;

    x |= x >> 1;
    x |= x >> 2;
    x |= x >> 4;
    x |= x >> 8;
    x |= x >> 16;
    x |= x >> 32;

    ++x;

    return x;
}

改的是boost里面的头文件\include\boost-1_82\boost\math\tools
config

#define BOOST_MATH_NO_MP_TESTS
//#if (__cplusplus > 201400L || _MSVC_LANG > 201400L)
#if (__cplusplus > 201402L || _MSVC_LANG > 201402L)
//#define BOOST_CXX14_CONSTEXPR constexpr
#define BOOST_CXX14_CONSTEXPR constexpr
#else
#define BOOST_CXX14_CONSTEXPR
#define BOOST_NO_CXX14_CONSTEXPR
#endif // BOOST_CXX14_CONSTEXPR

#if (__cplusplus > 201402L || _MSVC_LANG > 201402L)
直接跳过这个版本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lst0426

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值