Skip to content

Commit

Permalink
Inline variables
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Dec 10, 2023
1 parent 32d8892 commit 89fd2a4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 32 deletions.
26 changes: 0 additions & 26 deletions test/sources/LibcxxTester.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion test/sources/libcxx/support/Counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Counter : public Counter_base
T data_;
};

//int Counter_base::gConstructed = 0;
inline int Counter_base::gConstructed = 0;

namespace std {

Expand Down
2 changes: 1 addition & 1 deletion test/sources/libcxx/support/DefaultOnly.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ class DefaultOnly
{return x.data_ < y.data_;}
};

//int DefaultOnly::count = 0;
inline int DefaultOnly::count = 0;

#endif // DEFAULTONLY_H
2 changes: 2 additions & 0 deletions test/sources/libcxx/support/container_test_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ struct DisableAllocationGuard {
DisableAllocationGuard& operator=(DisableAllocationGuard const&);
};

inline bool DisableAllocationGuard::g_disable_allocations = false;

//===----------------------------------------------------------------------===//
// ContainerTestAllocator
//===----------------------------------------------------------------------===//
Expand Down
8 changes: 4 additions & 4 deletions test/sources/libcxx/support/min_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ struct malloc_allocator_base {
}
};

//size_t malloc_allocator_base::outstanding_bytes = 0;
//size_t malloc_allocator_base::alloc_count = 0;
//size_t malloc_allocator_base::dealloc_count = 0;
//bool malloc_allocator_base::disable_default_constructor = false;
inline size_t malloc_allocator_base::outstanding_bytes = 0;
inline size_t malloc_allocator_base::alloc_count = 0;
inline size_t malloc_allocator_base::dealloc_count = 0;
inline bool malloc_allocator_base::disable_default_constructor = false;


template <class T>
Expand Down

0 comments on commit 89fd2a4

Please sign in to comment.