내가 수행하여 vector
에 단어를 깰 수 비주얼 스튜디오에서 string foo
을 감안할 때 :Lvalue istringstream istream_iterator에 필요합니까?
vector fooVec{ istream_iterator<string>(istringstream(foo)), istream_iterator<string>() };
그러나 이것은 GCC 5.1에서 컴파일되지 않습니다. 나는 오류를 얻을 :
는 지금은 GCC가 우리 자신의 Jonathan Wakely에 의해 고정이 a bug을 한 것으로 알고있다. 이것은 버그의 연장인가요? 아니면 Rvalueinvalid initialization of non-const reference of type
std::istream_iterator<std::basic_string<char> >::istream_type&
{akastd::basic_istream<char>&
} from an rvalue of typestd::basic_istream<char>
istringstream
을 사용하는 것은 불법입니까?