[cfe-commits] r79679 - /cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp

Douglas Gregor dgregor at apple.com
Fri Aug 21 15:23:32 PDT 2009


Author: dgregor
Date: Fri Aug 21 17:23:24 2009
New Revision: 79679

URL: http://llvm.org/viewvc/llvm-project?rev=79679&view=rev
Log:
Add test for out-of-line definition of a conversion function

Modified:
    cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp

Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp?rev=79679&r1=79678&r2=79679&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp Fri Aug 21 17:23:24 2009
@@ -17,6 +17,8 @@
   void f3(size_type) const;
   void f4() ;
   
+  operator T*() const;
+  
   T value;
 };
 
@@ -56,3 +58,8 @@
 template<typename T, typename U>
 X0<T, U>::~X0() { }
 
+// Test out-of-line conversion functions.
+template<typename T, typename U>
+X0<T, U>::operator T*() const {
+  return &value;
+}





More information about the cfe-commits mailing list