Add a small test to see if the tested compilers support out of line template methods.

[SVN r55992]
This commit is contained in:
Daniel James
2009-09-03 07:37:30 +00:00
parent 6a8506d959
commit 7598d0d49b
2 changed files with 22 additions and 0 deletions

View File

@ -38,4 +38,5 @@ test-suite unordered
[ run rehash_tests.cpp ]
[ run equality_tests.cpp ]
[ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=2 ]
[ run out_of_line.cpp ]
;

View File

@ -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();
}