如何将已弃用的属性应用于 using 语句

How to apply the deprecated attribute to a using statement

如何将已弃用的属性应用于 using 语句,我可以将其应用于 typedef 而不是 using

似乎很奇怪
// Cannot do this
[[deprecated("Use a real int you wimp")]]
using Foo = int;

// This works just fine
[[deprecated("Use a real int you wimp")]]
typedef int Bar;

int main(int, char *[])
{
    Foo i = 43;

    (void)i;

    Bar j = 34;

    (void)j;
    return 0;
}

Like this:

using Foo [[deprecated("Use a real int you wimp")]] = int;