I was not able to get this to compile using the
Compiler Explorer[
^] with MSVC. However, by removing the
import
directive and adding
#include <type_traits>
gcc and clang both compiled with no warnings using -Wall -Wextra flags, but I did have to specify -std=c++20. Adding
#inlude <type_traits>
to the MSVC compile did not improve results, but maybe there are some flags for MSVC that will get MSVC to accept the code.