0

与えられた:

//C++17
#include <string>
struct Foo {
    int i;
    std::string str;
};

int main() {
    Foo foo{1, std::string("Hello, world!")};
}

それらにコピーする代わりに、それらから直接初期化できFoo::i、C++ 17標準を使用できない/できない理由を説明します(おそらくテスト目的のコード)? Foo::str1std::string(...)

できない場合、何部必要ですか?

4

1 に答える 1