// utility stl/clr header // Copyright (c) Microsoft Corporation. All rights reserved. #ifndef _CLI_UTILITY_ #define _CLI_UTILITY_ #include namespace cliext { // // TEMPLATE REF CLASS pair // template ref class pair { // store a pair of values public: typedef pair<_Value1_t, _Value2_t> _Mytype_t; typedef typename _Value1_t first_type; typedef typename _Value2_t second_type; // basics pair() { // construct default } pair(pair% _Right) : first(_Right.first), second(_Right.second) { // construct by copying _Right } pair(pair^ _Right) : first(_Right->first), second(_Right->second) { // construct by copying _Right } pair% operator=(pair% _Right) { // assign first = _Right.first; second = _Right.second; return (*this); } pair% operator=(pair^ _Right) { // assign first = _Right->first; second = _Right->second; return (*this); } // constructors pair(first_type _Val1) : first(_Val1) { // construct from first value only } pair(first_type _Val1, second_type _Val2) : first(_Val1), second(_Val2) { // construct from specified values } template pair(_Pair_t% _Right) : first(_Right.first), second(_Right.second) { // construct from pair type } template pair(_Pair_t^ _Right) : first(_Right->first), second(_Right->second) { // construct from pair type } template