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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-using.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Core issue 898
2
// { dg-options -std=c++0x }
3
 
4
namespace N { const int i = 42; }
5
namespace M { const int j = 42; }
6
 
7
constexpr int g() {
8
  using namespace N;
9
  using M::j;
10
  static_assert (i == 42, "i == 42");
11
  return i + j;
12
}
13
 
14
template 
15
constexpr int h() {
16
  using namespace N;
17
  using M::j;
18
  static_assert (i == 42, "i == 42");
19
  return i + j;
20
}
21
 
22
constexpr int i = g();
23
constexpr int i2 = h();
24
 
25
static_assert (i == 84, "i == 84");
26
static_assert (i2 == 84, "i2 == 84");
27
 

powered by: WebSVN 2.1.0

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