OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libstdc++-v3/] [testsuite/] [20_util/] [pair/] [piecewise2.cc] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 742 jeremybenn
// { dg-do compile }
2
// { dg-options "-std=gnu++0x" }
3
 
4
// Copyright (C) 2011 Free Software Foundation, Inc.
5
//
6
// This file is part of the GNU ISO C++ Library.  This library is free
7
// software; you can redistribute it and/or modify it under the
8
// terms of the GNU General Public License as published by the
9
// Free Software Foundation; either version 3, or (at your option)
10
// any later version.
11
//
12
// This library is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
// GNU General Public License for more details.
16
//
17
// You should have received a copy of the GNU General Public License along
18
// with this library; see the file COPYING3.  If not see
19
// <http://www.gnu.org/licenses/>.
20
 
21
#include <utility>
22
#include <tuple>
23
 
24
struct NoCon
25
{
26
  NoCon() = delete;
27
  NoCon(const NoCon&) = delete;
28
};
29
 
30
struct RefCheck1
31
{
32
  RefCheck1(NoCon&, NoCon&&) { }
33
  RefCheck1() = delete;
34
  RefCheck1(const RefCheck1&) = delete;
35
};
36
 
37
struct RefCheck2
38
{
39
  RefCheck2(const NoCon&, const NoCon&&, NoCon&) { }
40
  RefCheck2() = delete;
41
  RefCheck2(const RefCheck2&) = delete;
42
};
43
 
44
struct Default
45
{
46
  Default();
47
  Default(const Default&) = delete;
48
};
49
 
50
// libstdc++/51183
51
void test01(std::tuple<NoCon&, NoCon&&> t1,
52
            std::tuple<NoCon&, NoCon&&, NoCon&> t2)
53
{
54
  std::pair<RefCheck1, RefCheck2>(std::piecewise_construct, t1, t2);
55
}
56
 
57
void test02(std::tuple<> t1, std::tuple<int> t2)
58
{
59
  std::pair<Default, int> A(std::piecewise_construct, t1, t2);
60
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.