1 ////////////////////////////////////////////////////////////////////////////////
3 // Copyright (c) 2006 Richard Sposato
4 // Copyright (c) 2006 Peter Kümmel
5 // Permission to use, copy, modify, distribute and sell this software for any
6 // purpose is hereby granted without fee, provided that the above copyright
7 // notice appear in all copies and that both that copyright notice and this
8 // permission notice appear in supporting documentation.
9 // The authors make no representations about the
10 // suitability of this software for any purpose. It is provided "as is"
11 // without express or implied warranty.
12 ////////////////////////////////////////////////////////////////////////////////
13 #ifndef LOKI_CONST_POLICY_INC_
14 #define LOKI_CONST_POLICY_INC_
16 // $Id: ConstPolicy.h 769 2006-10-26 10:58:19Z syntheticpp $
22 ////////////////////////////////////////////////////////////////////////////////
23 /// @note These policy classes are used in LockingPtr and SmartPtr to define
24 /// how const is propagated from the pointee.
25 ////////////////////////////////////////////////////////////////////////////////
28 ////////////////////////////////////////////////////////////////////////////////
29 /// \class DontPropagateConst
31 /// \ingroup ConstGroup
32 /// Don't propagate constness of pointed or referred object.
33 ////////////////////////////////////////////////////////////////////////////////
36 struct DontPropagateConst
41 ////////////////////////////////////////////////////////////////////////////////
42 /// \class PropagateConst
44 /// \ingroup ConstGroup
45 /// Propagate constness of pointed or referred object.
46 ////////////////////////////////////////////////////////////////////////////////
54 // default will not break existing code
55 #ifndef LOKI_DEFAULT_CONSTNESS
56 #define LOKI_DEFAULT_CONSTNESS ::Loki::DontPropagateConst
59 } // end namespace Loki
61 #endif // end file guardian