C++ 内联使用静态数据初始值设定项

C++ 内联使用静态数据初始值设定项,c++,boost,initializer,multiprecision,C++,Boost,Initializer,Multiprecision,我在源文件中找到了此部分: struct initializer { initializer() { cpp_dec_float<Digits10, ExponentType, Allocator>::nan(); cpp_dec_float<Digits10, ExponentType, Allocator>::inf(); (cpp_dec_float<Digits10, ExponentT

我在源文件中找到了此部分:

struct initializer
  {
     initializer()
     {
        cpp_dec_float<Digits10, ExponentType, Allocator>::nan();
        cpp_dec_float<Digits10, ExponentType, Allocator>::inf();
        (cpp_dec_float<Digits10, ExponentType, Allocator>::min)();
        (cpp_dec_float<Digits10, ExponentType, Allocator>::max)();
        cpp_dec_float<Digits10, ExponentType, Allocator>::zero();
        cpp_dec_float<Digits10, ExponentType, Allocator>::one();
        cpp_dec_float<Digits10, ExponentType, Allocator>::two();
        cpp_dec_float<Digits10, ExponentType, Allocator>::half();
        cpp_dec_float<Digits10, ExponentType, Allocator>::double_min();
        cpp_dec_float<Digits10, ExponentType, Allocator>::double_max();
        cpp_dec_float<Digits10, ExponentType, Allocator>::long_double_max();
        cpp_dec_float<Digits10, ExponentType, Allocator>::long_double_min();
        cpp_dec_float<Digits10, ExponentType, Allocator>::long_long_max();
        cpp_dec_float<Digits10, ExponentType, Allocator>::long_long_min();
        cpp_dec_float<Digits10, ExponentType, Allocator>::ulong_long_max();
        cpp_dec_float<Digits10, ExponentType, Allocator>::eps();
        cpp_dec_float<Digits10, ExponentType, Allocator>::pow2(0);
     }
     void do_nothing(){}
  };

boost::multiprecision::number
将其第一个模板参数作为公共成员类型
backend\u type
重复。所以

test_num = test_num * mp_type::backend_type::two();
test_num = test_num * mp_type::backend_type::two();