ams-tschoening commented on a change in pull request #53:
URL: https://github.com/apache/logging-log4cxx/pull/53#discussion_r583593578



##########
File path: src/cmake/boost-fallback/boost-std-configuration.h.cmake
##########
@@ -0,0 +1,94 @@
+#ifndef BOOST_STD_CONFIGURATION_H
+#define BOOST_STD_CONFIGURATION_H
+
+#cmakedefine01 STD_THREAD_FOUND
+#cmakedefine01 Boost_THREAD_FOUND
+#cmakedefine01 STD_MUTEX_FOUND
+#cmakedefine01 Boost_MUTEX_FOUND
+#cmakedefine01 STD_SHARED_MUTEX_FOUND
+#cmakedefine01 Boost_SHARED_MUTEX_FOUND
+#cmakedefine01 STD_SHARED_PTR_FOUND
+#cmakedefine01 Boost_SHARED_PTR_FOUND
+#cmakedefine01 STD_ATOMIC_FOUND
+#cmakedefine01 Boost_ATOMIC_FOUND
+
+#if STD_THREAD_FOUND
+#include <thread>
+namespace ${NAMESPACE_ALIAS} {
+    typedef std::thread thread;
+}
+#elif Boost_THREAD_FOUND
+#include <boost/thread.hpp>
+namespace ${NAMESPACE_ALIAS} {
+    typedef boost::thread thread;
+}
+#endif
+
+#if STD_MUTEX_FOUND
+#include <mutex>
+#include <condition_variable>
+namespace ${NAMESPACE_ALIAS} {
+    typedef std::mutex mutex;
+    template <typename T>
+    using unique_lock = std::unique_lock<T>;

Review comment:
       Using inheritance compiles, but one needs to provide all CTORs, 
operators etc. manually this way:
   
   ```cpp
   template <typename T>
   class unique_lock : public boost::unique_lock<T>
   {
        public:
                unique_lock(const T& mutex) : boost::unique_lock(mutex) {}
   };
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to