Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55992 - trunk/libs/unordered/test/unordered
From: daniel_james_at_[hidden]
Date: 2009-09-03 03:37:31


Author: danieljames
Date: 2009-09-03 03:37:30 EDT (Thu, 03 Sep 2009)
New Revision: 55992
URL: http://svn.boost.org/trac/boost/changeset/55992

Log:
Add a small test to see if the tested compilers support out of line template methods.
Added:
   trunk/libs/unordered/test/unordered/out_of_line.cpp (contents, props changed)
Text files modified:
   trunk/libs/unordered/test/unordered/Jamfile.v2 | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: trunk/libs/unordered/test/unordered/Jamfile.v2
==============================================================================
--- trunk/libs/unordered/test/unordered/Jamfile.v2 (original)
+++ trunk/libs/unordered/test/unordered/Jamfile.v2 2009-09-03 03:37:30 EDT (Thu, 03 Sep 2009)
@@ -38,4 +38,5 @@
         [ run rehash_tests.cpp ]
         [ run equality_tests.cpp ]
         [ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=2 ]
+ [ run out_of_line.cpp ]
     ;

Added: trunk/libs/unordered/test/unordered/out_of_line.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/unordered/test/unordered/out_of_line.cpp 2009-09-03 03:37:30 EDT (Thu, 03 Sep 2009)
@@ -0,0 +1,21 @@
+// Just a little test to see if out of line template methods are supported:
+
+#include <boost/detail/lightweight_test.hpp>
+
+template <class T>
+struct foo {
+ template <class U>
+ bool bar(U x);
+};
+
+template <class T>
+template <class U>
+bool foo<T>::bar(U x) { return x; }
+
+int main() {
+ foo<int> x;
+ BOOST_TEST(x.bar(1));
+ BOOST_TEST(!x.bar(0));
+
+ return boost::report_errors();
+}
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk