range_adapter::operator= (STL/CLR)
저장 된 반복기 쌍을 바꿉니다.
range_adapter<Iter>% operator=(range_adapter<Iter>% right);
매개 변수
- right
복사 하는 어댑터입니다.
설명
멤버 연산자 복사본 right 는 개체를 다음 반환 *this.복사본의 저장 된 반복기 쌍을 저장된 하는 반복기 쌍 대체를 사용 하 여 right.
예제
// cliext_range_adapter_operator_as.cpp
// compile with: /clr
#include <cliext/adapter>
#include <cliext/deque>
typedef cliext::deque<wchar_t> Mycont;
typedef cliext::range_adapter<Mycont::iterator> Myrange;
int main()
{
cliext::deque<wchar_t> d1;
d1.push_back(L'a');
d1.push_back(L'b');
d1.push_back(L'c');
Myrange c1(d1.begin(), d1.end());
// display contents " a b c"
for each (wchar_t elem in c1)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
// assign to a new container
Myrange c2;
c2 = c1;
for each (wchar_t elem in c2)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
return (0);
}
요구 사항
헤더: < cliext/어댑터 >
네임 스페이스: cliext