21 Feb
2002
21 Feb
'02
2:51 p.m.
how do I define const smart pointer? for example for "int" type 1. scoped_ptr<const int> 2. const scoped_ptr<int> If the latter then it may be better to re-define get() as follows T* get(){ return px; } // never throws const T* get()const { return px; } // never throws Now scoped_ptr::get() is defined as follows T* get() const { return px; } // never throws The same apply to other accessors (operator-> and so on)
21 Feb
21 Feb
3:20 p.m.
New subject: [Boost-Users] const smart pointers
From: "nckgl"
how do I define const smart pointer?
for example for "int" type 1. scoped_ptr<const int>
A pointer to const int, similar to int const *.
2. const scoped_ptr<int>
A const pointer to int, similar to int * const.
8298
Age (days ago)
8298
Last active (days ago)
1 comments
2 participants
participants (2)
-
nckgl
-
Peter Dimov