From 1cc3f680e8317f91dbba918443c142cb0a9f66f5 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 20 Jan 2018 11:49:07 +0000 Subject: [PATCH] Fix a couple more explicit default constructors for Visual C++ 7.1 --- test/objects/test.hpp | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/test/objects/test.hpp b/test/objects/test.hpp index 8659eae6..7ce21fa9 100644 --- a/test/objects/test.hpp +++ b/test/objects/test.hpp @@ -189,7 +189,9 @@ namespace test { int type_; public: - explicit hash(int t = 0) : type_(t) {} + hash() : type_(0) {} + + explicit hash(int t) : type_(t) {} std::size_t operator()(object const& x) const { @@ -298,7 +300,9 @@ namespace test { int type_; public: - explicit equal_to(int t = 0) : type_(t) {} + equal_to() : type_(0) {} + + explicit equal_to(int t) : type_(t) {} bool operator()(object const& x1, object const& x2) const { @@ -354,15 +358,9 @@ namespace test { typedef allocator1 other; }; - allocator1() : tag_(0) - { - detail::tracker.allocator_ref(); - } + allocator1() : tag_(0) { detail::tracker.allocator_ref(); } - explicit allocator1(int t) : tag_(t) - { - detail::tracker.allocator_ref(); - } + explicit allocator1(int t) : tag_(t) { detail::tracker.allocator_ref(); } template allocator1(allocator1 const& x) : tag_(x.tag_) { @@ -606,15 +604,9 @@ namespace test { typedef allocator2 other; }; - allocator2() : tag_(0) - { - detail::tracker.allocator_ref(); - } + allocator2() : tag_(0) { detail::tracker.allocator_ref(); } - explicit allocator2(int t) : tag_(t) - { - detail::tracker.allocator_ref(); - } + explicit allocator2(int t) : tag_(t) { detail::tracker.allocator_ref(); } template allocator2(allocator2 const& x) : tag_(x.tag_) {