summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C
blob: 0ba6790f4c990435aab7cfcd8461705b3c09158c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test for the warning of exposing types from an anonymous namespace
// { dg-do compile }
//
#include <memory>
#include "anonymous-namespace-3.h"

struct B { std::auto_ptr<A> p; };

#line 10 "foo.C"
struct C		   // { dg-warning "uses the anonymous namespace" }
{
  std::auto_ptr<A> p;
};