Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 902 Bytes

compiler-warning-level-1-c4688.md

File metadata and controls

33 lines (26 loc) · 902 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4688
Compiler Warning (level 1) C4688
11/04/2016
C4688
C4688
a027df3c-b2b8-4c49-8539-c2bc42db74e8

Compiler Warning (level 1) C4688

'constraint': constraint list contains assembly private type 'type'

A constraint list has an assembly private type, meaning it will not be available when the type is accessed from outside the assembly. For more information, see Generics.

Example

The following sample generates C4688.

// C4688.cpp
// compile with: /clr /c /W1
ref struct A {};   // private type
public ref struct B {};

// Delete the following 3 lines to resolve.
generic <class T>
where T : A   // C4688
public ref struct M {};

generic <class T>
where T : B
public ref struct N {};