compile error (TBD)

This commit is contained in:
mutouyun 2019-01-27 15:43:07 +08:00
parent fc1c058d10
commit b76375633c
4 changed files with 7 additions and 10 deletions

View File

@ -37,7 +37,7 @@ struct id_type<0, AlignSize> {
};
template <std::size_t DataSize = 0,
std::size_t AlignSize = (ipc::detail::min)(DataSize, alignof(std::size_t))>
std::size_t AlignSize = ipc::detail::min_val(DataSize, alignof(std::size_t))>
class id_pool {
public:
enum : std::size_t {

View File

@ -23,7 +23,7 @@ using namespace ipc;
using msg_id_t = std::size_t;
template <std::size_t DataSize,
std::size_t AlignSize = (ipc::detail::min)(DataSize, alignof(std::size_t))>
std::size_t AlignSize = ipc::detail::min_val(DataSize, alignof(std::size_t))>
struct msg_t;
template <std::size_t AlignSize>

View File

@ -150,7 +150,7 @@ public:
using alloc_policy = AllocP;
enum : std::size_t {
block_size = (ipc::detail::max)(BlockSize, sizeof(void*))
block_size = ipc::detail::max_val(BlockSize, sizeof(void*))
};
private:

View File

@ -5,7 +5,6 @@
#include <shared_mutex>
#include <type_traits>
#include <tuple>
#include <algorithm>
#include <atomic>
#include "def.h"
@ -57,8 +56,6 @@ namespace detail {
using std::unique_ptr;
using std::unique_lock;
using std::shared_lock;
using std::max;
using std::min;
#else /*__cplusplus < 201703L*/
@ -83,18 +80,18 @@ constexpr auto shared_lock(T&& lc) {
return std::shared_lock<std::decay_t<T>> { std::forward<T>(lc) };
}
#endif/*__cplusplus < 201703L*/
template <typename T>
constexpr T const & max(const T& a, const T& b) {
constexpr T const & max_val(const T& a, const T& b) {
return a < b ? b : a;
}
template <typename T>
constexpr T const & min(const T& a, const T& b) {
constexpr T const & min_val(const T& a, const T& b) {
return b < a ? b : a;
}
#endif/*__cplusplus < 201703L*/
std::size_t calc_unique_id();
template <typename F, typename D>