From 7598d0d49bb5ba6d9c598af295df781303f25902 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 3 Sep 2009 07:37:30 +0000 Subject: [PATCH] Add a small test to see if the tested compilers support out of line template methods. [SVN r55992] --- test/unordered/Jamfile.v2 | 1 + test/unordered/out_of_line.cpp | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/unordered/out_of_line.cpp diff --git a/test/unordered/Jamfile.v2 b/test/unordered/Jamfile.v2 index ee1505f7..5a4696f6 100644 --- a/test/unordered/Jamfile.v2 +++ b/test/unordered/Jamfile.v2 @@ -38,4 +38,5 @@ test-suite unordered [ run rehash_tests.cpp ] [ run equality_tests.cpp ] [ run swap_tests.cpp : : : BOOST_UNORDERED_SWAP_METHOD=2 ] + [ run out_of_line.cpp ] ; diff --git a/test/unordered/out_of_line.cpp b/test/unordered/out_of_line.cpp new file mode 100644 index 00000000..b8d24e1f --- /dev/null +++ b/test/unordered/out_of_line.cpp @@ -0,0 +1,21 @@ +// Just a little test to see if out of line template methods are supported: + +#include + +template +struct foo { + template + bool bar(U x); +}; + +template +template +bool foo::bar(U x) { return x; } + +int main() { + foo x; + BOOST_TEST(x.bar(1)); + BOOST_TEST(!x.bar(0)); + + return boost::report_errors(); +} \ No newline at end of file