C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Relocation in C++

From: Bjorn Reese <breese_at_[hidden]>
Date: Tue, 1 Feb 2022 18:31:33 +0100
Just adding another failed attempt to the fray.

I explored another venue that uses stateful metaprogramming to enable or
disable member functions. The basic idea was to use constrain member
functions on compile-time counters. A ultimate goal was to disable
destructors if their "destructive move constructor/function" had been
called.

Unfortunately that did not work out because metaprogramming is not aware
of control flow, so enabling or disabling member function did not work
correctly with conditional statements or loops.

   http://breese.github.io/2021/06/06/almost-affine.html
   http://breese.github.io/2021/06/13/obscurable-types.html

Received on 2022-02-01 17:31:36