]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/inspect/assert_macro_check.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / inspect / assert_macro_check.hpp
1 // assert_macro_check header --------------------------------------------------------//
2
3 // Copyright Eric Niebler 2010.
4 // Based on the apple_macro_check checker by Marshall Clow
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 #ifndef BOOST_ASSERT_MACRO_CHECK_HPP
10 #define BOOST_ASSERT_MACRO_CHECK_HPP
11
12 #include "inspector.hpp"
13
14
15 namespace boost
16 {
17 namespace inspect
18 {
19 class assert_macro_check : public inspector
20 {
21 long m_files_with_errors;
22 bool m_from_boost_root;
23 public:
24
25 assert_macro_check();
26 virtual const char * name() const { return "*ASSERT-MACROS*"; }
27 virtual const char * desc() const { return "presence of C-style assert macro in file (use BOOST_ASSERT instead)"; }
28
29 virtual void inspect(
30 const std::string & library_name,
31 const path & full_path,
32 const std::string & contents );
33
34 virtual ~assert_macro_check()
35 { std::cout << " " << m_files_with_errors << " files with a C-style assert macro" << line_break(); }
36 };
37 }
38 }
39
40 #endif // BOOST_ASSERT_MACRO_CHECK_HPP