CppCMS
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
booster
smart_ptr
operator_bool.h
1
// This header intentionally has no include guards.
2
//
3
// Copyright (c) 2001-2009 Peter Dimov
4
//
5
// Distributed under the Boost Software License, Version 1.0.
6
// See accompanying file LICENSE_1_0.txt or copy at
7
// http://www.boost.org/LICENSE_1_0.txt
8
9
10
typedef
T * this_type::*unspecified_bool_type;
11
12
operator
unspecified_bool_type() const
// never throws
13
{
14
return
px == 0? 0: &this_type::px;
15
}
16
17
// operator! is redundant, but some compilers need it
18
bool
operator! () const
// never throws
19
{
20
return
px == 0;
21
}
Generated on Sun Dec 3 2017 22:47:16 for CppCMS by
1.8.11