class storage { T a[N]; public: T* get(); // a の中のある要素を指すポインタを返す bool contains( T const* p ) const; // p が a の中の要素を指しているかどうか判定 }; bool storage::contains( T const* p ) const { return ( p != 0 ) && ( &a[0] <= p ) && ( p <= &a[N] ); }
あー。微妙にずれてるな。 コンストラクタの呼び出しに一時オブジェクトへの参照を渡すんだから、 この場合はこっちか?(同じく 12.2 -5- より) "A temporary bound to a reference parameter in a function call persists until the completion of the full expression containing the call."
Blake Stowell: C++ is one of the properties that SCO owns today and we frequently are approached by customers who wish to license C++ from us and we do charge for that. Those arrangements are done on a case-by-case basis with each customer and are not disclosed publicly. C++ licensing is currently part of SCO's SCOsource licensing program.