Skip to content

Instantly share code, notes, and snippets.

@atsushieno
Last active October 24, 2024 07:28
Show Gist options
  • Save atsushieno/e15dbb0c2d1711c642cbc4955599afe5 to your computer and use it in GitHub Desktop.
Save atsushieno/e15dbb0c2d1711c642cbc4955599afe5 to your computer and use it in GitHub Desktop.
clang++ -std=c++2b and -std=c++23 fail, while clang++ w/o them and g++ pass. (both x86_64 trunk on Compiler Explorer)
#include <memory>
#include <cassert>
struct Timer {
void clear() { pimpl.reset(); }
private:
struct Pimpl;
std::unique_ptr<Pimpl> pimpl;
};
struct Timer::Pimpl {
};
int main() {
Timer timer;
timer.clear();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment