Skip to content

Commit e9c845d

Browse files
committed
Include header.hpp/footer.hpp in .cpp files to silence warnings.
Related to boostorg#241.
1 parent fcc1101 commit e9c845d

15 files changed

+59
-3
lines changed

include/boost/filesystem/detail/utf8_codecvt_facet.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#include <boost/filesystem/config.hpp>
1111

12+
#include <boost/filesystem/detail/header.hpp>
13+
1214
#define BOOST_UTF8_BEGIN_NAMESPACE \
1315
namespace boost { \
1416
namespace filesystem { \
@@ -26,4 +28,6 @@
2628
#undef BOOST_UTF8_END_NAMESPACE
2729
#undef BOOST_UTF8_DECL
2830

29-
#endif
31+
#include <boost/filesystem/detail/footer.hpp>
32+
33+
#endif // BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP

src/codecvt_error_category.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include "private_config.hpp"
2424

25+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
26+
2527
//--------------------------------------------------------------------------------------//
2628

2729
namespace boost {
@@ -114,3 +116,5 @@ const codecvt_error_category_initializer g_codecvt_error_category_initializer;
114116

115117
} // namespace filesystem
116118
} // namespace boost
119+
120+
#include <boost/filesystem/detail/footer.hpp>

src/directory.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
#include "error_handling.hpp"
7373
#include "private_config.hpp"
7474

75+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
76+
7577
// BOOST_FILESYSTEM_STATUS_CACHE enables file_status cache in
7678
// dir_itr_increment. The config tests are placed here because some of the
7779
// macros being tested come from dirent.h.
@@ -1460,3 +1462,5 @@ void recursive_directory_iterator_increment(recursive_directory_iterator& it, sy
14601462

14611463
} // namespace filesystem
14621464
} // namespace boost
1465+
1466+
#include <boost/filesystem/detail/footer.hpp>

src/error_handling.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <boost/winapi/error_codes.hpp>
2525
#endif
2626

27+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
28+
2729
namespace boost {
2830
namespace filesystem {
2931

@@ -173,4 +175,6 @@ inline bool error(err_t error_num, path const& p1, path const& p2, system::error
173175
} // namespace filesystem
174176
} // namespace boost
175177

178+
#include <boost/filesystem/detail/footer.hpp>
179+
176180
#endif // BOOST_FILESYSTEM_SRC_ERROR_HANDLING_HPP_

src/exception.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "error_handling.hpp"
2121

22-
#include <boost/config/abi_prefix.hpp> // must be the last #include
22+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
2323

2424
namespace boost {
2525
namespace filesystem {
@@ -185,4 +185,4 @@ void emit_error(err_t error_num, path const& p1, path const& p2, system::error_c
185185
} // namespace filesystem
186186
} // namespace boost
187187

188-
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
188+
#include <boost/filesystem/detail/footer.hpp>

src/operations.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ using std::time_t;
170170
#include "error_handling.hpp"
171171
#include "private_config.hpp"
172172

173+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
174+
173175
namespace fs = boost::filesystem;
174176
using boost::filesystem::path;
175177
using boost::filesystem::filesystem_error;
@@ -4216,3 +4218,5 @@ path weakly_canonical(path const& p, path const& base, system::error_code* ec)
42164218
} // namespace detail
42174219
} // namespace filesystem
42184220
} // namespace boost
4221+
4222+
#include <boost/filesystem/detail/footer.hpp>

src/path.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#include "atomic_tools.hpp"
4141
#include "private_config.hpp"
4242

43+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
44+
4345
namespace fs = boost::filesystem;
4446

4547
using boost::filesystem::path;
@@ -1678,3 +1680,5 @@ BOOST_FILESYSTEM_DECL path const& dot_dot_path()
16781680
} // namespace detail
16791681
} // namespace filesystem
16801682
} // namespace boost
1683+
1684+
#include <boost/filesystem/detail/footer.hpp>

src/path_traits.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <cwchar> // for wcslen
2323
#include <cstddef>
2424

25+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
26+
2527
namespace pt = boost::filesystem::path_traits;
2628
namespace fs = boost::filesystem;
2729
namespace bs = boost::system;
@@ -195,3 +197,5 @@ void convert(const wchar_t* from,
195197
} // namespace path_traits
196198
} // namespace filesystem
197199
} // namespace boost
200+
201+
#include <boost/filesystem/detail/footer.hpp>

src/portability.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <cstring> // SGI MIPSpro compilers need this
1818
#include <string>
1919

20+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
21+
2022
namespace boost {
2123
namespace filesystem {
2224

@@ -77,3 +79,5 @@ BOOST_FILESYSTEM_DECL bool portable_file_name(std::string const& name)
7779

7880
} // namespace filesystem
7981
} // namespace boost
82+
83+
#include <boost/filesystem/detail/footer.hpp>

src/posix_tools.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include <unistd.h>
2020
#endif
2121

22+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
23+
2224
namespace boost {
2325
namespace filesystem {
2426
namespace detail {
@@ -61,4 +63,6 @@ inline int close_fd(int fd)
6163
} // namespace filesystem
6264
} // namespace boost
6365

66+
#include <boost/filesystem/detail/footer.hpp>
67+
6468
#endif // BOOST_FILESYSTEM_SRC_POSIX_TOOLS_HPP_

src/unique_path.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
#include "atomic_tools.hpp"
9696
#include "error_handling.hpp"
9797

98+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
99+
98100
#if defined(BOOST_POSIX_API)
99101
// At least Mac OS X 10.6 and older doesn't support O_CLOEXEC
100102
#ifndef O_CLOEXEC
@@ -325,3 +327,5 @@ path unique_path(path const& model, system::error_code* ec)
325327
} // namespace detail
326328
} // namespace filesystem
327329
} // namespace boost
330+
331+
#include <boost/filesystem/detail/footer.hpp>

src/utf8_codecvt_facet.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include <boost/filesystem/config.hpp>
99

10+
#include <boost/filesystem/detail/header.hpp>
11+
1012
#define BOOST_UTF8_BEGIN_NAMESPACE \
1113
namespace boost { \
1214
namespace filesystem { \
@@ -23,3 +25,5 @@
2325
#undef BOOST_UTF8_BEGIN_NAMESPACE
2426
#undef BOOST_UTF8_END_NAMESPACE
2527
#undef BOOST_UTF8_DECL
28+
29+
#include <boost/filesystem/detail/footer.hpp>

src/windows_file_codecvt.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include <windows.h>
2121

22+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
23+
2224
namespace boost {
2325
namespace filesystem {
2426
namespace detail {
@@ -65,4 +67,6 @@ std::codecvt_base::result windows_file_codecvt::do_out(
6567
} // namespace filesystem
6668
} // namespace boost
6769

70+
#include <boost/filesystem/detail/footer.hpp>
71+
6872
#endif // BOOST_WINDOWS_API

src/windows_file_codecvt.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include <cwchar> // std::mbstate_t
2020
#include <locale>
2121

22+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
23+
2224
namespace boost {
2325
namespace filesystem {
2426
namespace detail {
@@ -63,6 +65,8 @@ class BOOST_SYMBOL_VISIBLE windows_file_codecvt BOOST_FINAL :
6365
} // namespace filesystem
6466
} // namespace boost
6567

68+
#include <boost/filesystem/detail/footer.hpp>
69+
6670
#endif // BOOST_WINDOWS_API
6771

6872
#endif // BOOST_FILESYSTEM_WINDOWS_FILE_CODECVT_HPP

src/windows_tools.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#include <windows.h>
2323

24+
#include <boost/filesystem/detail/header.hpp> // must be the last #include
25+
2426
#ifndef IO_REPARSE_TAG_MOUNT_POINT
2527
#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
2628
#endif
@@ -186,4 +188,6 @@ inline HANDLE create_file_handle(boost::filesystem::path const& p, DWORD dwDesir
186188
} // namespace filesystem
187189
} // namespace boost
188190

191+
#include <boost/filesystem/detail/footer.hpp>
192+
189193
#endif // BOOST_FILESYSTEM_SRC_WINDOWS_TOOLS_HPP_

0 commit comments

Comments
 (0)