Debian Codegraph @

cmake/cxx_tests/template_scoped_argument_matching.cpp

raw
1 // DESCRIPTION
2 //
3 // Test to check whether the C++ compiler supports function matching with argument types which are
4 // template scope-qualified.
5 // In sync with AC_CXX_TEMPLATE_SCOPED_ARGUMENT_MATCHING (2008-04-12).
6 //
7 // COPYLEFT
8 //
9 // Copyright (c) 2008 Todd Veldhuizen
10 // Copyright (c) 2009 Theo Papadopoulo <[email protected]>
11 // Copyright (c) 2008 Luc Maisonobe <[email protected]>
12 //
13 // Copying and distribution of this file, with or without modification, are
14 // permitted in any medium without royalty provided the copyright notice
15 // and this notice are preserved.
16
17 #ifndef HAVE_TYPENAME
18 #define typename
19 #endif
20
21 template<class X> class A { public : typedef X W; };
22 template<class Y> class B {};
23 template<class Y> void operator+(B<Y> d1,typename Y::W d2) {}
24
25 int main() {
26 B<A<float> > z;
27 z+0.5f;
28 return 0;
29 }