Why didn't my cPP code pass the clion compilation on the linux platform?

at first I found that it was a bug, that appeared in a low version of gcc. When I upgraded gcc, it could be compiled under the command line, but it failed in clion. How to adjust it in clion.

-sharpinclude <iostream>

void print() {

}

template <class T, class ...Args>
void print(T head, Args... rest) {
    std::cout << head << std::endl;
    print(rest...);
}

template <typename ...Args>
void info(Args... rest) {
    auto lmb = [=]() {
        print(rest...);
    };
    lmb();
};


int main() {
    //error: expansion pattern "rest" contains no arument packs
    info("asdfdasf", "asdfsdf");
    return 0;
}
Mar.02,2021
Menu