Peter Collingbourne | 148f1f7 | 2011-03-20 08:06:45 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s |
2 | |||||
3 | constexpr int x = 1; | ||||
4 | constexpr int id(int x) { return x; } | ||||
5 | |||||
6 | void foo(void) { | ||||
7 | x = 2; // expected-error {{read-only variable is not assignable}} | ||||
8 | int (*idp)(int) = id; | ||||
9 | } | ||||
10 |