2
0
mirror of https://github.com/boostorg/pfr.git synced 2026-01-19 04:22:13 +00:00

Make static_assert messages more visible

This commit is contained in:
Antony Polukhin
2018-06-02 00:18:27 +03:00
parent 4a6d8d10c7
commit d36729a3ad
34 changed files with 80 additions and 80 deletions

View File

@@ -70,7 +70,7 @@ template <class T>
constexpr auto tie_as_tuple(T& val) noexcept {
static_assert(
!std::is_union<T>::value,
"For safety reasons it is forbidden to reflect unions. It could lead to crashes (for example when attempting to output the union with inactive first `const char*` field)."
"====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. It could lead to crashes (for example when attempting to output the union with inactive first `const char*` field)."
);
typedef size_t_<fields_count<T>()> fields_count_tag;
return boost::pfr::detail::tie_as_tuple(val, fields_count_tag{});