repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged trunk at revision 161680 into branch.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nullptr08.C
blob
1e5db278ddf879da5bc7223f7c47fa3d083fc931
1
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
4
// Test conversion to bool
5
6
#define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)
7
8
void fun()
9
{
10
assert_true(nullptr ? false : true);
11
decltype(nullptr) mynull = 0;
12
assert_true(mynull ? false : true);
13
}