//! @copyright *this file is freware. //! @warning Use it at your own risk. //! @file identity_test.cpp //! @author Dejan D. M. Milosavljevic //! @version 1.0 //! @date 2003 //! @please "Do not remove or change this comments" //! @description identity tests. //! @bug //! @warning Use it at your own risk. //! @copyright *this file is freware. #include #include #include #include "identity.hpp" using namespace std; using namespace stl_ext; int main_identity( int argc, char *argv[] ) { cout << "--- main_identity ---" << endl; int I_int=10; identity_original()( I_int ) =123; cout << "identity_original()( I_int ) ==" << identity_original()( I_int ) << endl; float I_float=11; //identity_convert()( I_float ) = 10; //error: '=' : left operand must be l-value cout << "identity_convert()( I_float ) == " << identity_convert()( I_float ) << endl; double I_double=12; //identity_convert()( I_double ) = 10; //error: '=' : left operand must be l-value cout << "identity_convert()( I_double ) ==" << identity_convert()( I_double ) << endl; complex I_complex( 13, 14 ); cout << identity_copy >()( I_complex ) << endl; //cin.get(); return 0; }