Skip to content

Commit

Permalink
Remove unneccessary class
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Oct 16, 2018
1 parent 748c39d commit 462c11e
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions test/test_singleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@
#include "test_singleton.hpp"
#include <boost/serialization/singleton.hpp>

class x {
};

template<class T>
void
test1(const x & x1, const x & x2){
test1(const T & x1, const T & x2){
BOOST_CHECK(& x1 == & x2);
}

void test_same_instance(){
const x & x1 = boost::serialization::singleton<x>::get_const_instance();
const x & x2 = boost::serialization::singleton<x>::get_const_instance();

BOOST_CHECK(& x1 == & x2);

test1(
boost::serialization::singleton<x>::get_const_instance(),
boost::serialization::singleton<x>::get_const_instance()
boost::serialization::singleton<plainSingleton>::get_const_instance(),
boost::serialization::singleton<plainSingleton>::get_const_instance()
);
test1(
inheritedSingleton::get_const_instance(),
inheritedSingleton::get_const_instance()
);
};

Expand Down

0 comments on commit 462c11e

Please sign in to comment.