Fix a couple more explicit default constructors for Visual C++ 7.1

This commit is contained in:
Daniel James 2018-01-20 11:49:07 +00:00
parent f7665a2743
commit 1cc3f680e8

View File

@ -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<U> 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 <class Y> allocator1(allocator1<Y> const& x) : tag_(x.tag_)
{
@ -606,15 +604,9 @@ namespace test {
typedef allocator2<U> 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 <class Y> allocator2(allocator2<Y> const& x) : tag_(x.tag_)
{