]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/log/test/compile_fail/attr_functor_void_return.cpp
2 * Copyright Andrey Semashev 2007 - 2015.
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 attr_functor_void_return.cpp
9 * \author Andrey Semashev
12 * \brief This test checks that it is not possible to create a functor attribute
13 * with a void-returning functor.
16 #define BOOST_TEST_MODULE attr_functor_void_return
18 #include <boost/utility/result_of.hpp>
19 #include <boost/log/attributes/attribute.hpp>
20 #include <boost/log/attributes/function.hpp>
22 namespace logging
= boost::log
;
23 namespace attrs
= logging::attributes
;
27 // A test function that returns an attribute value
28 void get_attr_value();
32 int main(int, char*[])
34 logging::attribute attr1
=
35 #ifndef BOOST_NO_RESULT_OF
36 attrs::make_function(&get_attr_value
);
38 attrs::make_function
< void >(&get_attr_value
);