Hi,
not sure whether I've missed some conditional that would exclude this case,
but your change seems to incorrectly handle trivial types that have a
non-zero bit pattern of value-initialized object, e.g. pointer to member.
Regards,
Maciej Cencora
han Wakely wrote:
> >
> > On Thu, 27 Jun 2024 at 13:40, Maciej Cencora wrote:
> > >
> > > Hi,
> > >
> > > not sure whether I've missed some conditional that would exclude this
> case, but your change seems to incorrectly handle trivial ty
I think going the bit_cast way would be the best because it enables the
optimization for many more classes including common wrappers like optional,
variant, pair, tuple and std::array.
Regards,
Maciej Cencora
czw., 27 cze 2024 o 14:57 Maciej Cencora napisał(a):
> You could include some of
timized out.
I guess the best option would be to introduce in C++ language a new
compiler-backed type trait like:
std::zero_initialized_object_has_all_zeros_object_representation.
Regards,
Maciej
pt., 28 cze 2024 o 00:25 Jonathan Wakely napisał(a):
> On Thu, 27 Jun 2024 at 14:27, Maciej Cen
idden friends.
Another thing - P2465r3 mentions only lerp, byte and related ops as
special w.r.t skipping export from global namespace in std.compat, but
for some reason Microsoft's impl treats 3-arg hypot as special as
well.
Regards,
Maciej Cencora
Hi,
two issues:
1) #include is missing in std.compat.cc.in
2) does the updated std.compat module actually work? When I experimented
with implementing the std module in gcc, I couldn't #include standard
headers, after they were imported via std module (since GMF merging isn't
implemented yet), i.
Hi,
unless I missed it, updates of std and std.compat modules are missing.
Regards,
Maciej
Hi,
update of std module is missing.
Regards,
Maciej
Hi,
instead of uglyfing all the libstdc++ code wouldn't it be simpler to
just ignore all non-reserved macro expansions (+ some special ones
like assert) inside system headers on compiler level?
Regards,
Maciej
Hi,
variant getter can be implemented in C++17 without using "recursive"
calls, but by generating a list of member pointers and applying them
with fold expression. Here's an example:
https://godbolt.org/z/3vcKjWjPG
Regards,
Maciej
Hi,
you can emulate C++17 inline variables in C++11 with either of the two ways:
1) via a template helper
template
struct Helper
{
static constexpr unsigned value[4] = {1, 2, 3, 4};
};
template
constexpr unsigned Helper::value[4];
static constexpr auto& arr = Helper<>::value;
2) extern c
11 matches
Mail list logo