options->dict_size = UINT32_C(1) << (uint8_t []){
18, 20, 21, 22, 22, 23, 23, 24, 25, 26 }[level];
http://svn.r-project.org/R/trunk/src/extra/xz/lzma/lzma_encoder_presets.c
#ifndef UINT32_C
# if UINT_MAX != 4294967295U
# error UINT32_C is not defined and unsigned int is not 32-bit.
# endif
# define UINT32_C(n) n ## U
#endif
为windows编译这个。但是出现语法错误
error C2059: syntax error : '{'
error C2143: syntax error : missing ';' before '{'
error C2337: 'level' : attribute not found
typedef struct {
uint32_t dict_size;
// ...
} lzma_options_lzma;
有没有人试过这个?
另外,我从未见过像这样的代码uint8_t []{...}[level]
;
这是什么意思?