Removing void specs for std :: future and std :: prom

For the article describing the removal of the void specialization for std :: future and std :: prom P0241R0 . It may be a dumb question, but the proposed solution is to completely remove the void specialization, but then what did people expect to do when they want to instantiate an object std::future<void>?

+6
source share
2 answers

As noted in the link, this is possible if it voidwas a regular type .

void get_value() {
    void x;
    return x;
}

, . "", . ( "", , , , . "null", .)

+5

std:: future - , . , .

-3

Source: https://habr.com/ru/post/1017401/


All Articles