g++ -std=c++0x ref_test.cpp ref_test.cpp: In function ‘void f(Type) [with Type = std::reference_wrapper]’: ref_test.cpp:23: instantiated from here ref_test.cpp:13: error: no match for ‘operator=’ in ‘x = 1’ /usr/include/c++/4.3/tr1_impl/functional:452: note: candidates are: std::reference_wrapper<_Tp>& std::reference_wrapper<_Tp>::operator=(const std::reference_wrapper<_Tp>&) [with _Tp = int]
You can use some HTML elements, such as <b>, <i>, <a>, also, some characters need to be entity referenced such as <, > and & Your comment may need to be confirmed by blog author. Your comment will be published under GFDL 1.3 or later license with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
GCC 4.4.2でもerrorでした。
ReplyDeleteg++ -std=c++0x ref_test.cpp
ref_test.cpp: In function ‘void f(Type) [with Type = std::reference_wrapper]’:
ref_test.cpp:23: instantiated from here
ref_test.cpp:13: error: no match for ‘operator=’ in ‘x = 1’
/usr/include/c++/4.3/tr1_impl/functional:452: note: candidates are: std::reference_wrapper<_Tp>& std::reference_wrapper<_Tp>::operator=(const std::reference_wrapper<_Tp>&) [with _Tp = int]