diff --git a/ostd/argparse.hh b/ostd/argparse.hh index 43ef217..67ffdc4 100644 --- a/ostd/argparse.hh +++ b/ostd/argparse.hh @@ -190,7 +190,7 @@ protected: * number of arguments. */ arg_argument(arg_value req, std::size_t nargs): - arg_description(), p_valreq(req), p_nargs(nargs) + arg_description(), p_nargs(nargs), p_valreq(req) {} /** @brief A helper constructor with a number of arguments. @@ -199,14 +199,14 @@ protected: */ arg_argument(std::size_t nargs): arg_description(), - p_valreq(arg_value::EXACTLY), - p_nargs(nargs) + p_nargs(nargs), + p_valreq(arg_value::EXACTLY) {} private: std::string p_helpstr, p_metavar; - arg_value p_valreq; std::size_t p_nargs; + arg_value p_valreq; }; /** @brief An optional argument class. diff --git a/ostd/thread_pool.hh b/ostd/thread_pool.hh index 617f1dc..6a573d8 100644 --- a/ostd/thread_pool.hh +++ b/ostd/thread_pool.hh @@ -95,7 +95,8 @@ namespace detail { } private: std::aligned_storage_t< - sizeof(tpool_func_impl>) + sizeof(tpool_func_impl>), + alignof(tpool_func_impl>) > p_buf; tpool_func_base *p_func; }; diff --git a/src/string.cc b/src/string.cc index 65ac807..fda2a79 100644 --- a/src/string.cc +++ b/src/string.cc @@ -37,7 +37,7 @@ inline std::size_t tstrlen_impl(C const *p) noexcept { } } { - /* (e.g. x86_64 => sizeof(size_t) == 8 * sizeof(char) */ + /* e.g. x86_64 => sizeof(size_t) == 8 * sizeof(char) */ auto *wp = reinterpret_cast(p); /* check if any unit in the size_t is zero, in binary: *