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
c++: prev declared hidden tmpl friend inst [PR112288]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
explicit7.C
blob
dfa4e138d4cb0364152bd514b5b3c517b6a57828
1
// P0892R2
2
// { dg-do compile }
3
// { dg-options "-std=c++2a" }
4
5
template<typename T>
6
struct B {
7
static const T value = true;
8
};
9
10
struct X {
11
template<typename T>
12
explicit(B<T>::value) operator T();
13
};
14
15
int
16
main ()
17
{
18
X x;
19
int i = x.operator int();
20
int i3 = x; // { dg-error "cannot convert" }
21
int i2{x};
22
}