Compiler Error C3749
'attribute': a custom attribute may not be used inside a function
A custom attribute cannot be used inside a function. For more information on custom attributes, see the topic attribute.
Example
The following sample generates C3749:
// C3749a.cpp
// compile with: /clr /c
using namespace System;
[AttributeUsage(AttributeTargets::All)]
public ref struct ABC : public Attribute {
ABC() {}
};
void f1() { [ABC]; }; // C3749
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir