view gcc/testsuite/g++.old-deja/g++.pt/spec26.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// { dg-do assemble  }
// From: lat@iki.fi (Lassi A. Tuura)
// Test that a specialization without an initializer is not a definition,
// as specified in [temp.expl.spec].


struct X;
template <class T> struct Y { static const X array[]; };
template <> const X Y<int>::array [];
struct X { int i; };
template <> const X Y<int>::array [] = { 0, 1, 2, 3 };