c++返回类型.

static constexpr auto get_type() {
    if constexpr (maxLength < 0xFFFE) {
        return type<uint16_t>;
    } else {
        return type<uint32_t>;
    }
}

using CellIdx = decltype(get_type())::type;

这里一个c++标委会成员,其介绍了比较多的c++20

posted @ 2020-02-06 23:00  zjh6  阅读(17)  评论(0)    收藏  举报  来源