]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/explicit_operator_bool_compile_fail_conv_int.cpp
2 * Copyright Andrey Semashev 2007 - 2013.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
8 * \file explicit_operator_bool_compile_fail_conv_int.cpp
9 * \author Andrey Semashev
12 * \brief This test checks that explicit operator bool cannot be used in
13 * an unintended context.
16 #define BOOST_TEST_MODULE explicit_operator_bool_compile_fail_conv_int
18 #include <boost/utility/explicit_operator_bool.hpp>
22 // A test object that has the operator of explicit conversion to bool
25 BOOST_EXPLICIT_OPERATOR_BOOL()
26 bool operator! () const
34 int main(int, char*[])