https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83000

            Bug ID: 83000
           Summary: Constraints for union-templates do not work
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wilhelm.me...@hs-kl.de
  Target Milestone: ---

In the following example, the requirement is not met. But the template-union
Test is instantiated:

    template<typename T>
    requires (sizeof(T) > 1) 
    union Test {
    };
    int main(){
        Test<char> x;
    }

If one changes the union into a struct, the requirement is correctly checked
and the struct-template not instantiated.

Reply via email to