
26 Jul
2011
26 Jul
'11
10:39 p.m.
boost::shared_ptr<int> p(new int(42)); To access elements of the array I can do: p.get()[10] = 7; But wouldn't it be nicer to do: p[10] = 7; // ? So: why is no T& operator[](int) defined for shared_ptr ? I'm just interested in the design reasons for this. cheers Gareth -- View this message in context: http://boost.2283326.n4.nabble.com/shared-ptr-why-no-operator-tp3697208p3697... Sent from the Boost - Dev mailing list archive at Nabble.com.