]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/assert/test/current_function_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / assert / test / current_function_test.cpp
1 #include <boost/config.hpp>
2
3 #if defined(BOOST_MSVC)
4 #pragma warning(disable: 4786) // identifier truncated in debug info
5 #pragma warning(disable: 4710) // function not inlined
6 #pragma warning(disable: 4711) // function selected for automatic inline expansion
7 #pragma warning(disable: 4514) // unreferenced inline removed
8 #endif
9
10 //
11 // current_function_test.cpp - a test for boost/current_function.hpp
12 //
13 // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
14 //
15 // Distributed under the Boost Software License, Version 1.0. (See
16 // accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
18 //
19
20 #include <boost/current_function.hpp>
21 #include <boost/config.hpp>
22 #include <cstdio>
23
24 void message(char const * file, long line, char const * func, char const * msg)
25 {
26 #if !defined(BOOST_NO_STDC_NAMESPACE)
27 using std::printf;
28 #endif
29
30 printf("%s(%ld): in function '%s': %s\n", file, line, func, msg);
31 }
32
33 #define MESSAGE(msg) message(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION, msg)
34
35 int main()
36 {
37 MESSAGE("testing BOOST_CURRENT_FUNCTION");
38 return 0;
39 }