Skip to content

Commit c1c4f60

Browse files
authored
Update compiler-error-c2993.md
Couple last edits, including a couple that would be Acrolinx hits.
1 parent aed3da7 commit c1c4f60

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c2993.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ helpviewer_keywords: ["C2993"]
1010
'identifier' : illegal type for non-type template parameter 'parameter'
1111

1212
- Prior to C++20, you cannot declare a template with a structure, class, or union argument. Pointers can be used in place of these types as template parameters.
13-
- Since C++20, structure, class, or unions *can* be used as non-type template parameters. A non-type template parameter cannot be a rvalue reference type. Neither is a parameter pack of rvalue types allowed.
13+
- Since C++20, structure, class, or unions *can* be used as non-type template parameters. A non-type template parameter can't be a rvalue reference type or a parameter pack of rvalue types.
1414

1515
The following sample generates C2993:
1616

@@ -36,8 +36,7 @@ template <class T, MyStruct* S> // OK
3636
class MyClass2 {};
3737
```
3838

39-
With C++17 and earlier, you cannot have floating point non-type template parameters. Since C++20, floating point non-type template parameters are allowed as with literal class types.
40-
If it's a function template, use a function argument to pass the floating point non-type template parameter.
39+
With C++17 and earlier, you can't have floating point non-type template parameters. Since C++20, floating point non-type template parameters are allowed. Use a function argument to pass the floating point non-type template parameter to function templates.
4140

4241
Before MSVC 19.26, the following code emitted C2993. It now emits C7582:
4342

0 commit comments

Comments
 (0)