forked from OctaForge/libostd
minor fixes
This commit is contained in:
parent
69d5d11da1
commit
827aed2bb9
3 changed files with 7 additions and 6 deletions
|
@ -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.
|
||||
|
|
|
@ -95,7 +95,8 @@ namespace detail {
|
|||
}
|
||||
private:
|
||||
std::aligned_storage_t<
|
||||
sizeof(tpool_func_impl<std::packaged_task<void()>>)
|
||||
sizeof(tpool_func_impl<std::packaged_task<void()>>),
|
||||
alignof(tpool_func_impl<std::packaged_task<void()>>)
|
||||
> p_buf;
|
||||
tpool_func_base *p_func;
|
||||
};
|
||||
|
|
|
@ -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<std::size_t const *>(p);
|
||||
/* check if any unit in the size_t is zero, in binary:
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue