Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-07-10 04:48:32 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-07-10 04:48:32 +0300
commite5078f3ceb2831b02cbffa0febbfa6d4fa9e6217 (patch)
tree0d3fa063b01b4303838cb85a6735653c78cc45c0
parent6982f9d7caaf6dae08bb763bb73d582047d19452 (diff)
Tried out VS2015's experimental C++ Modules support with AFIO v2. Sadly, it's a bust, no matter what I do it's ICEs all round. Disabled for now.
-rw-r--r--CMakeLists.txt11
-rw-r--r--include/boost/afio/afio.hpp13
-rw-r--r--include/boost/afio/afio.ixx4
m---------include/boost/afio/boost-lite0
-rw-r--r--include/boost/afio/revision.hpp4
-rw-r--r--include/boost/afio/v2.0/afio.hpp25
-rw-r--r--include/boost/afio/v2.0/async_file_handle.hpp2
-rw-r--r--include/boost/afio/v2.0/config.hpp13
-rw-r--r--include/boost/afio/v2.0/deadline.h2
-rw-r--r--include/boost/afio/v2.0/file_handle.hpp2
-rw-r--r--include/boost/afio/v2.0/handle.hpp2
-rw-r--r--include/boost/afio/v2.0/io_service.hpp2
-rw-r--r--include/boost/afio/v2.0/native_handle_type.hpp2
-rw-r--r--include/boost/afio/v2.0/statfs.hpp2
-rw-r--r--include/boost/afio/v2.0/storage_profile.hpp2
-rw-r--r--include/boost/afio/v2.0/utils.hpp2
16 files changed, 74 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97e81244..8ec06701 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,11 +39,20 @@ all_compile_features(PUBLIC
if(WIN32)
all_compile_definitions(PRIVATE _WIN32_WINNT=0x600) ## Target WinVista
endif()
-
# Anyone using the static or dynamic libraries is not using the header only variant
foreach(lib afio_sl afio_dl)
target_compile_definitions(${lib} INTERFACE BOOST_AFIO_HEADERS_ONLY=0)
+ target_compile_definitions(${lib} PRIVATE BOOST_AFIO_SOURCE=1)
endforeach()
+# Test C++ Modules (ICEs in VS2015 Update 3)
+if(MSVC AND 0)
+ target_compile_definitions(afio_dl PUBLIC -D__cpp_modules=1)
+ target_compile_options(afio_dl PUBLIC /experimental:module)
+ target_sources(afio_dl PRIVATE include/boost/afio/afio.ixx)
+ set_source_files_properties(include/boost/afio/afio.ixx PROPERTIES
+ LANGUAGE CXX
+ )
+endif()
# For all possible configurations of this library, add each test
include(BoostLiteMakeStandardTests)
diff --git a/include/boost/afio/afio.hpp b/include/boost/afio/afio.hpp
index b0d64c05..bbcf10ee 100644
--- a/include/boost/afio/afio.hpp
+++ b/include/boost/afio/afio.hpp
@@ -1,6 +1,4 @@
#include "version.hpp"
-#define BOOST_AFIO_HEADERS_PATH4(a) #a
-#define BOOST_AFIO_HEADERS_PATH3(a) BOOST_AFIO_HEADERS_PATH4(a)
#if defined(_MSC_VER) && !defined(__clang)
#define BOOST_AFIO_HEADERS_PATH2 BOOST_AFIO_VERSION_GLUE(v, BOOST_AFIO_HEADERS_VERSION, /afio.hpp)
@@ -8,5 +6,16 @@
#define BOOST_AFIO_HEADERS_PATH2 BOOST_AFIO_VERSION_GLUE(v, BOOST_AFIO_HEADERS_VERSION,)/afio.hpp
#endif
+#undef BOOST_AFIO_MODULE_NAME
+#if defined(__cpp_modules)
+#if defined(_MSC_VER) && !defined(__clang)
+#define BOOST_AFIO_MODULE_NAME BOOST_AFIO_VERSION_GLUE(afio_v, BOOST_AFIO_NAMESPACE_VERSION,)
+#else
+#define BOOST_AFIO_MODULE_NAME BOOST_AFIO_VERSION_GLUE(afio_v, BOOST_AFIO_NAMESPACE_VERSION,)
+#endif
+#endif
+
+#define BOOST_AFIO_HEADERS_PATH4(a) #a
+#define BOOST_AFIO_HEADERS_PATH3(a) BOOST_AFIO_HEADERS_PATH4(a)
#define BOOST_AFIO_HEADERS_PATH BOOST_AFIO_HEADERS_PATH3(BOOST_AFIO_HEADERS_PATH2)
#include BOOST_AFIO_HEADERS_PATH
diff --git a/include/boost/afio/afio.ixx b/include/boost/afio/afio.ixx
new file mode 100644
index 00000000..4d0e2b02
--- /dev/null
+++ b/include/boost/afio/afio.ixx
@@ -0,0 +1,4 @@
+// Tell the headers we are generating the interface for the library
+#define GENERATING_CXX_MODULE_INTERFACE
+module afio_v2_0; // BOOST_AFIO_MODULE_NAME
+#include "afio.hpp"
diff --git a/include/boost/afio/boost-lite b/include/boost/afio/boost-lite
-Subproject 0ed87e235695c27387d052e430bbad17a61d67e
+Subproject 63ab6e7728b8058b2d0e991f88d51d0a6d31de9
diff --git a/include/boost/afio/revision.hpp b/include/boost/afio/revision.hpp
index e550032b..131559de 100644
--- a/include/boost/afio/revision.hpp
+++ b/include/boost/afio/revision.hpp
@@ -1,3 +1,3 @@
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
-#define BOOST_AFIO_PREVIOUS_COMMIT_REF 25b3589f826b7c8a790f00f1870a69314198713e
-#define BOOST_AFIO_PREVIOUS_COMMIT_DATE "2016-07-09 20:33:34 +00:00"
+#define BOOST_AFIO_PREVIOUS_COMMIT_REF 6982f9d7caaf6dae08bb763bb73d582047d19452
+#define BOOST_AFIO_PREVIOUS_COMMIT_DATE "2016-07-09 23:25:10 +00:00"
diff --git a/include/boost/afio/v2.0/afio.hpp b/include/boost/afio/v2.0/afio.hpp
index ddbc5a48..e4610955 100644
--- a/include/boost/afio/v2.0/afio.hpp
+++ b/include/boost/afio/v2.0/afio.hpp
@@ -1,3 +1,26 @@
+// If C++ Modules are on and we are not compiling the library,
+// we are either generating the interface or importing
+#if defined(__cpp_modules)
+#if defined(GENERATING_CXX_MODULE_INTERFACE)
+// We are generating this module's interface
+#define BOOSTLITE_HEADERS_ONLY 0
+#define BOOST_AFIO_HEADERS_ONLY 0
+#define BOOST_AFIO_INCLUDE_ALL
+#elif defined(BOOST_AFIO_SOURCE)
+// We are implementing this module
+#define BOOST_AFIO_INCLUDE_ALL
+#else
+// We are importing this module
+import BOOST_AFIO_MODULE_NAME;
+#undef BOOST_AFIO_INCLUDE_ALL
+#endif
+#else
+// C++ Modules not on, therefore include as usual
+#define BOOST_AFIO_INCLUDE_ALL
+#endif
+
+#ifdef BOOST_AFIO_INCLUDE_ALL
+
#include "async_file_handle.hpp"
#include "statfs.hpp"
#include "storage_profile.hpp"
@@ -6,3 +29,5 @@
#include "algorithm/shared_fs_mutex/byte_ranges.hpp"
#include "detail/child_process.hpp"
+
+#endif
diff --git a/include/boost/afio/v2.0/async_file_handle.hpp b/include/boost/afio/v2.0/async_file_handle.hpp
index 56861f1b..10d39f49 100644
--- a/include/boost/afio/v2.0/async_file_handle.hpp
+++ b/include/boost/afio/v2.0/async_file_handle.hpp
@@ -35,7 +35,7 @@ DEALINGS IN THE SOFTWARE.
#ifndef BOOST_AFIO_ASYNC_FILE_HANDLE_H
#define BOOST_AFIO_ASYNC_FILE_HANDLE_H
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
//! A handle to an open something
class BOOST_AFIO_DECL async_file_handle : public file_handle
diff --git a/include/boost/afio/v2.0/config.hpp b/include/boost/afio/v2.0/config.hpp
index 8941d07c..5408e3ee 100644
--- a/include/boost/afio/v2.0/config.hpp
+++ b/include/boost/afio/v2.0/config.hpp
@@ -206,13 +206,26 @@ namespace boost
{ \
inline namespace v2 \
{
+#define BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN \
+ namespace boost \
+ { \
+ namespace afio \
+ { \
+ inline namespace v2 \
+ {
#define BOOST_AFIO_V2_NAMESPACE_END \
} \
} \
}
+#elif defined(GENERATING_CXX_MODULE_INTERFACE)
+#define BOOST_AFIO_V2_NAMESPACE BOOSTLITE_NAMESPACE(BOOST_AFIO_V2)
+#define BOOST_AFIO_V2_NAMESPACE_BEGIN BOOSTLITE_NAMESPACE_BEGIN(BOOST_AFIO_V2)
+#define BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN BOOSTLITE_NAMESPACE_EXPORT_BEGIN(BOOST_AFIO_V2)
+#define BOOST_AFIO_V2_NAMESPACE_END BOOSTLITE_NAMESPACE_END(BOOST_AFIO_V2)
#else
#define BOOST_AFIO_V2_NAMESPACE BOOSTLITE_NAMESPACE(BOOST_AFIO_V2)
#define BOOST_AFIO_V2_NAMESPACE_BEGIN BOOSTLITE_NAMESPACE_BEGIN(BOOST_AFIO_V2)
+#define BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN BOOSTLITE_NAMESPACE_BEGIN(BOOST_AFIO_V2)
#define BOOST_AFIO_V2_NAMESPACE_END BOOSTLITE_NAMESPACE_END(BOOST_AFIO_V2)
#endif
diff --git a/include/boost/afio/v2.0/deadline.h b/include/boost/afio/v2.0/deadline.h
index 08871d5f..e33f8b9e 100644
--- a/include/boost/afio/v2.0/deadline.h
+++ b/include/boost/afio/v2.0/deadline.h
@@ -38,7 +38,7 @@ DEALINGS IN THE SOFTWARE.
#ifdef __cplusplus
#include "config.hpp"
#include <stdexcept>
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
#define BOOST_AFIO_DEADLINE_NAME deadline
#else
#define BOOST_AFIO_DEADLINE_NAME boost_afio_deadline
diff --git a/include/boost/afio/v2.0/file_handle.hpp b/include/boost/afio/v2.0/file_handle.hpp
index 30dd009b..831820c5 100644
--- a/include/boost/afio/v2.0/file_handle.hpp
+++ b/include/boost/afio/v2.0/file_handle.hpp
@@ -39,7 +39,7 @@ DEALINGS IN THE SOFTWARE.
#pragma warning(disable : 4251) // dll interface
#endif
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
class io_service;
diff --git a/include/boost/afio/v2.0/handle.hpp b/include/boost/afio/v2.0/handle.hpp
index d7a55f5b..63045b10 100644
--- a/include/boost/afio/v2.0/handle.hpp
+++ b/include/boost/afio/v2.0/handle.hpp
@@ -43,7 +43,7 @@ DEALINGS IN THE SOFTWARE.
#pragma warning(disable : 4251) // dll interface
#endif
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
/*! \class handle
\brief A native_handle_type which is managed by the lifetime of this object instance.
diff --git a/include/boost/afio/v2.0/io_service.hpp b/include/boost/afio/v2.0/io_service.hpp
index fb5c5643..3e0d6957 100644
--- a/include/boost/afio/v2.0/io_service.hpp
+++ b/include/boost/afio/v2.0/io_service.hpp
@@ -91,7 +91,7 @@ struct aiocb;
#pragma warning(disable : 4251) // dll interface
#endif
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
class io_service;
class async_file_handle;
diff --git a/include/boost/afio/v2.0/native_handle_type.hpp b/include/boost/afio/v2.0/native_handle_type.hpp
index e3aee8bc..71c8608e 100644
--- a/include/boost/afio/v2.0/native_handle_type.hpp
+++ b/include/boost/afio/v2.0/native_handle_type.hpp
@@ -34,7 +34,7 @@ DEALINGS IN THE SOFTWARE.
#ifndef BOOST_AFIO_NATIVE_HANDLE_TYPE_H
#define BOOST_AFIO_NATIVE_HANDLE_TYPE_H
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
/*! \struct native_handle_type
\brief A native handle type used for wrapping file descriptors, process ids or HANDLEs.
diff --git a/include/boost/afio/v2.0/statfs.hpp b/include/boost/afio/v2.0/statfs.hpp
index c5e3a3c7..11d85367 100644
--- a/include/boost/afio/v2.0/statfs.hpp
+++ b/include/boost/afio/v2.0/statfs.hpp
@@ -39,7 +39,7 @@ DEALINGS IN THE SOFTWARE.
#pragma warning(disable : 4251) // dll interface
#endif
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
class handle;
diff --git a/include/boost/afio/v2.0/storage_profile.hpp b/include/boost/afio/v2.0/storage_profile.hpp
index 11286c40..ac49112e 100644
--- a/include/boost/afio/v2.0/storage_profile.hpp
+++ b/include/boost/afio/v2.0/storage_profile.hpp
@@ -39,7 +39,7 @@ DEALINGS IN THE SOFTWARE.
#pragma warning(disable : 4251) // dll interface
#endif
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
namespace storage_profile
{
diff --git a/include/boost/afio/v2.0/utils.hpp b/include/boost/afio/v2.0/utils.hpp
index 1f15a2c5..9712c18a 100644
--- a/include/boost/afio/v2.0/utils.hpp
+++ b/include/boost/afio/v2.0/utils.hpp
@@ -34,7 +34,7 @@ DEALINGS IN THE SOFTWARE.
#include "config.hpp"
-BOOST_AFIO_V2_NAMESPACE_BEGIN
+BOOST_AFIO_V2_NAMESPACE_EXPORT_BEGIN
//! Utility routines often useful when using AFIO
namespace utils