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]
1 comment:
GCC 4.4.2でもerrorでした。
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]
Post a Comment