- Timestamp:
- Oct 17, 2006, 3:03:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/vector.h
r686 r693 73 73 @code 74 74 const vector vm(13,1.0); 75 vector v1(vm,2,4); // bad code! 76 v1(0)=-123; // accepted by compiler, runtime failurewill occur77 const vector v2(vm,2,4); 75 vector v1(vm,2,4); // bad code! not const! 76 v1(0)=-123; // accepted by compiler, runtime abort will occur 77 const vector v2(vm,2,4); // proper code 78 78 v2(0)=-123; // not acceptable for the compiler 79 79 @endcode … … 502 502 gsl_vector_view* view_; 503 503 gsl_vector_const_view* view_const_; 504 // proxy_v_ is used to access the proper underlying v_ or v_const_ 505 // in all const member functions. 504 506 const gsl_vector* proxy_v_; 505 507 };
Note: See TracChangeset
for help on using the changeset viewer.