]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc
re PR testsuite/39696 (gcc.dg/tree-ssa/ssa-ccp-25.c scan-tree-dump doesn't work on...
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / shared_ptr / cons / default.cc
CommitLineData
3422222a 1// { dg-options "-std=gnu++0x" }
52a64bd3 2
aaf0ca6f 3// Copyright (C) 2005, 2006, 2007 Free Software Foundation
52a64bd3
PC
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 2, or (at your option)
9// any later version.
af13a7a6 10
52a64bd3
PC
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
52a64bd3 15
aaf0ca6f
JW
16// You should have received a copy of the GNU General Public License along
17// with this library; see the file COPYING. If not, write to the Free
18// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19// USA.
20
21// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
52a64bd3 22
af13a7a6 23#include <memory>
aaf0ca6f
JW
24#include <testsuite_hooks.h>
25
26struct A { };
27
28// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
29
30// Default construction
31int
32test01()
33{
34 bool test __attribute__((unused)) = true;
35
36 std::shared_ptr<A> a;
37 VERIFY( a.get() == 0 );
38
39 return 0;
40}
52a64bd3 41
aaf0ca6f
JW
42int
43main()
44{
45 test01();
46 return 0;
47}