Since all the compilers support out of line template members use them

and lots of other things.

[SVN r56329]
This commit is contained in:
Daniel James
2009-09-20 21:55:15 +00:00
parent 491fa330f6
commit 78b078f41d
16 changed files with 2462 additions and 2061 deletions

View File

@@ -21,14 +21,17 @@ namespace test
namespace test_detail
{
template <typename T> struct list_node;
template <typename T> class list_node;
template <typename T> class list_data;
template <typename T> class list_iterator;
template <typename T> class list_const_iterator;
template <typename T>
struct list_node
class list_node
{
list_node(list_node const&);
list_node& operator=(list_node const&);
public:
T value_;
list_node* next_;
@@ -243,8 +246,8 @@ namespace test
node** merge_adjacent_ranges(node** first, node** second,
node** third, Less less)
{
while(true) {
while(true) {
for(;;) {
for(;;) {
if(first == second) return third;
if(less((*second)->value_, (*first)->value_)) break;
first = &(*first)->next_;
@@ -256,7 +259,7 @@ namespace test
// Since the two ranges we just swapped, the order is now:
// first...third...second
while(true) {
for(;;) {
if(first == third) return second;
if(!less((*first)->value_, (*third)->value_)) break;
first = &(*first)->next_;

View File

@@ -116,7 +116,7 @@ bool compare(Range1 const& x, Range2 const& y)
}
template <class Container>
bool general_erase_range_test(Container& x, int start, int end)
bool general_erase_range_test(Container& x, std::size_t start, std::size_t end)
{
collide_list l(x.begin(), x.end());
l.erase(boost::next(l.begin(), start), boost::next(l.begin(), end));

View File

@@ -10,7 +10,7 @@ struct foo {
template <class T>
template <class U>
bool foo<T>::bar(U x) { return x; }
bool foo<T>::bar(U x) { return x ? true : false; }
int main() {
foo<int> x;