operator_bool.hpp
Go to the documentation of this file.
1 // This header intentionally has no include guards.
2 //
3 // Copyright (c) 2001-2009, 2012 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 #if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\
10  && !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
11 
12  explicit operator bool () const BOOST_NOEXCEPT
13  {
14  return px != 0;
15  }
16 
17 #elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
18 
19  operator bool () const BOOST_NOEXCEPT
20  {
21  return px != 0;
22  }
23 
24 #elif defined( _MANAGED )
25 
26  static void unspecified_bool( this_type*** )
27  {
28  }
29 
30  typedef void (*unspecified_bool_type)( this_type*** );
31 
32  operator unspecified_bool_type() const BOOST_NOEXCEPT
33  {
34  return px == 0? 0: unspecified_bool;
35  }
36 
37 #elif \
38  ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
39  ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
40  ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
41 
42  typedef element_type * (this_type::*unspecified_bool_type)() const;
43 
44  operator unspecified_bool_type() const BOOST_NOEXCEPT
45  {
46  return px == 0? 0: &this_type::get;
47  }
48 
49 #else
50 
51  typedef element_type * this_type::*unspecified_bool_type;
52 
53  operator unspecified_bool_type() const BOOST_NOEXCEPT
54  {
55  return px == 0? 0: &this_type::px;
56  }
57 
58 #endif
59 
60  // operator! is redundant, but some compilers need it
62  {
63  return px == 0;
64  }
operator!
bool operator!() const BOOST_NOEXCEPT
Definition: operator_bool.hpp:61
boost::multi_index::get
nth_index< multi_index_container< Value, IndexSpecifierList, Allocator >, N >::type & get(multi_index_container< Value, IndexSpecifierList, Allocator > &m) BOOST_NOEXCEPT
Definition: multi_index_container.hpp:981
BOOST_NOEXCEPT
#define BOOST_NOEXCEPT
Definition: suffix.hpp:938


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:45:34