Stop using BOOST_DEDUCED_TYPENAME

We no longer support any of the compilers that require it. I'd be very
surprised if anything was working on them.
This commit is contained in:
Daniel James committed 2018-01-27 09:39:59 +00:00
1 parent 09be9bae04
commit cfd4bacc2c
31 files changed
+412 -504

No files matched your search

+4 -4
View File
@@ -58,12 +58,12 @@ namespace test {
template <class Container> class unordered_equivalence_tester
{
BOOST_DEDUCED_TYPENAME Container::size_type size_;
BOOST_DEDUCED_TYPENAME Container::hasher hasher_;
BOOST_DEDUCED_TYPENAME Container::key_equal key_equal_;
typename Container::size_type size_;
typename Container::hasher hasher_;
typename Container::key_equal key_equal_;
float max_load_factor_;
typedef test::list<BOOST_DEDUCED_TYPENAME Container::value_type> value_list;
typedef test::list<typename Container::value_type> value_list;
value_list values_;
public:
+6 -9
View File
@@ -176,21 +176,18 @@ namespace test {
DISABLE_EXCEPTIONS;
test::check_instances check;
test::scope = "";
BOOST_DEDUCED_TYPENAME Test::data_type x(test_.init());
BOOST_DEDUCED_TYPENAME Test::strong_type strong;
typename Test::data_type x(test_.init());
typename Test::strong_type strong;
strong.store(x);
try {
ENABLE_EXCEPTIONS;
call_ignore_extra_parameters<Test,
BOOST_DEDUCED_TYPENAME Test::data_type,
BOOST_DEDUCED_TYPENAME Test::strong_type>(
&Test::run, test_, x, strong);
call_ignore_extra_parameters<Test, typename Test::data_type,
typename Test::strong_type>(&Test::run, test_, x, strong);
} catch (...) {
try {
DISABLE_EXCEPTIONS;
call_ignore_extra_parameters<Test,
BOOST_DEDUCED_TYPENAME Test::data_type const,
BOOST_DEDUCED_TYPENAME Test::strong_type const>(
call_ignore_extra_parameters<Test, typename Test::data_type const,
typename Test::strong_type const>(
&Test::check, test_, constant(x), constant(strong));
} catch (...) {
exception_in_check_ = true;
+2 -2
View File
@@ -11,7 +11,7 @@
namespace test {
template <class Container> struct get_key_impl
{
typedef BOOST_DEDUCED_TYPENAME Container::key_type key_type;
typedef typename Container::key_type key_type;
static key_type const& get_key(key_type const& x) { return x; }
@@ -30,7 +30,7 @@ namespace test {
};
template <class Container, class T>
inline BOOST_DEDUCED_TYPENAME Container::key_type const& get_key(T const& x)
inline typename Container::key_type const& get_key(T const& x)
{
return get_key_impl<Container>::get_key(x);
}
+9 -13
View File
@@ -12,7 +12,7 @@
namespace test {
template <class Iterator> struct proxy
{
typedef BOOST_DEDUCED_TYPENAME Iterator::value_type value_type;
typedef typename Iterator::value_type value_type;
explicit proxy(value_type const& v) : v_(v) {}
proxy(proxy const& x) : v_(x.v_) {}
@@ -26,10 +26,8 @@ namespace test {
template <class Iterator> struct input_iterator_adaptor
{
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
value_type;
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::pointer
pointer;
typedef typename std::iterator_traits<Iterator>::value_type value_type;
typedef typename std::iterator_traits<Iterator>::pointer pointer;
typedef proxy<Iterator> reference;
typedef std::ptrdiff_t difference_type;
typedef std::input_iterator_tag iterator_category;
@@ -66,14 +64,12 @@ namespace test {
template <class Iterator> struct copy_iterator_adaptor
{
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
value_type;
typedef BOOST_DEDUCED_TYPENAME
std::iterator_traits<Iterator>::difference_type difference_type;
typedef BOOST_DEDUCED_TYPENAME
std::iterator_traits<Iterator>::iterator_category iterator_category;
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::pointer
pointer;
typedef typename std::iterator_traits<Iterator>::value_type value_type;
typedef
typename std::iterator_traits<Iterator>::difference_type difference_type;
typedef typename std::iterator_traits<Iterator>::iterator_category
iterator_category;
typedef typename std::iterator_traits<Iterator>::pointer pointer;
typedef proxy<Iterator> reference;
copy_iterator_adaptor() : base_() {}
+11 -12
View File
@@ -24,12 +24,12 @@
namespace test {
template <class X> void check_equivalent_keys(X const& x1)
{
BOOST_DEDUCED_TYPENAME X::key_equal eq = x1.key_eq();
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
typename X::key_equal eq = x1.key_eq();
typedef typename X::key_type key_type;
std::set<key_type, std::less<key_type> > found_;
BOOST_DEDUCED_TYPENAME X::const_iterator it = x1.begin(), end = x1.end();
BOOST_DEDUCED_TYPENAME X::size_type size = 0;
typename X::const_iterator it = x1.begin(), end = x1.end();
typename X::size_type size = 0;
while (it != end) {
// First test that the current key has not occurred before, required
// to test either that keys are unique or that equivalent keys are
@@ -60,9 +60,9 @@ namespace test {
// Check that the keys are in the correct bucket and are
// adjacent in the bucket.
BOOST_DEDUCED_TYPENAME X::size_type bucket = x1.bucket(key);
BOOST_DEDUCED_TYPENAME X::const_local_iterator lit = x1.begin(bucket),
lend = x1.end(bucket);
typename X::size_type bucket = x1.bucket(key);
typename X::const_local_iterator lit = x1.begin(bucket),
lend = x1.end(bucket);
unsigned int count_checked = 0;
for (; lit != lend && !eq(get_key<X>(*lit), key); ++lit) {
@@ -106,12 +106,11 @@ namespace test {
// Check that size in the buckets matches up.
BOOST_DEDUCED_TYPENAME X::size_type bucket_size = 0;
typename X::size_type bucket_size = 0;
for (BOOST_DEDUCED_TYPENAME X::size_type i = 0; i < x1.bucket_count();
++i) {
for (BOOST_DEDUCED_TYPENAME X::const_local_iterator begin2 = x1.begin(i),
end2 = x1.end(i);
for (typename X::size_type i = 0; i < x1.bucket_count(); ++i) {
for (typename X::const_local_iterator begin2 = x1.begin(i),
end2 = x1.end(i);
begin2 != end2; ++begin2) {
++bucket_size;
}
+6 -10
View File
@@ -11,23 +11,19 @@
namespace test {
template <class Container>
struct is_set
: public boost::is_same<BOOST_DEDUCED_TYPENAME Container::key_type,
BOOST_DEDUCED_TYPENAME Container::value_type>
struct is_set : public boost::is_same<typename Container::key_type,
typename Container::value_type>
{
};
template <class Container> struct has_unique_keys
{
static char flip(BOOST_DEDUCED_TYPENAME Container::iterator const&);
static long flip(
std::pair<BOOST_DEDUCED_TYPENAME Container::iterator, bool> const&);
static char flip(typename Container::iterator const&);
static long flip(std::pair<typename Container::iterator, bool> const&);
BOOST_STATIC_CONSTANT(bool,
value = sizeof(long) ==
sizeof(
flip(((Container*)0)
->insert(
*(BOOST_DEDUCED_TYPENAME Container::value_type*)0))));
sizeof(flip(
((Container*)0)->insert(*(typename Container::value_type*)0))));
};
}
+5 -5
View File
@@ -15,7 +15,7 @@
namespace test {
template <class X> struct unordered_generator_set
{
typedef BOOST_DEDUCED_TYPENAME X::value_type value_type;
typedef typename X::value_type value_type;
random_generator type_;
@@ -41,8 +41,8 @@ namespace test {
template <class X> struct unordered_generator_map
{
typedef BOOST_DEDUCED_TYPENAME X::key_type key_type;
typedef BOOST_DEDUCED_TYPENAME X::mapped_type mapped_type;
typedef typename X::key_type key_type;
typedef typename X::mapped_type mapped_type;
random_generator type_;
@@ -78,7 +78,7 @@ namespace test {
template <class X>
struct unordered_generator : public unordered_generator_base<X>::type
{
typedef BOOST_DEDUCED_TYPENAME unordered_generator_base<X>::type base;
typedef typename unordered_generator_base<X>::type base;
unordered_generator(random_generator const& type = default_generator)
: base(type)
@@ -87,7 +87,7 @@ namespace test {
};
template <class X>
struct random_values : public test::list<BOOST_DEDUCED_TYPENAME X::value_type>
struct random_values : public test::list<typename X::value_type>
{
random_values() {}
+1 -1
View File
@@ -15,7 +15,7 @@
namespace test {
template <class X> class strong
{
typedef test::list<BOOST_DEDUCED_TYPENAME X::value_type> values_type;
typedef test::list<typename X::value_type> values_type;
values_type values_;
unsigned int allocations_;
+16 -25
View File
@@ -22,7 +22,7 @@
namespace test {
template <typename X> struct equals_to_compare
{
typedef std::less<BOOST_DEDUCED_TYPENAME X::first_argument_type> type;
typedef std::less<typename X::first_argument_type> type;
};
template <> struct equals_to_compare<test::equal_to>
@@ -32,7 +32,7 @@ namespace test {
template <class X1, class X2> void compare_range(X1 const& x1, X2 const& x2)
{
typedef test::list<BOOST_DEDUCED_TYPENAME X1::value_type> value_list;
typedef test::list<typename X1::value_type> value_list;
value_list values1(x1.begin(), x1.end());
value_list values2(x2.begin(), x2.end());
values1.sort();
@@ -60,44 +60,38 @@ namespace test {
template <typename X> struct ordered_base<X, true, true>
{
typedef std::set<BOOST_DEDUCED_TYPENAME X::value_type,
BOOST_DEDUCED_TYPENAME
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
typedef std::set<typename X::value_type,
typename equals_to_compare<typename X::key_equal>::type>
type;
};
template <typename X> struct ordered_base<X, true, false>
{
typedef std::multiset<BOOST_DEDUCED_TYPENAME X::value_type,
BOOST_DEDUCED_TYPENAME
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
typedef std::multiset<typename X::value_type,
typename equals_to_compare<typename X::key_equal>::type>
type;
};
template <typename X> struct ordered_base<X, false, true>
{
typedef std::map<BOOST_DEDUCED_TYPENAME X::key_type,
BOOST_DEDUCED_TYPENAME X::mapped_type,
BOOST_DEDUCED_TYPENAME
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
typedef std::map<typename X::key_type, typename X::mapped_type,
typename equals_to_compare<typename X::key_equal>::type>
type;
};
template <typename X> struct ordered_base<X, false, false>
{
typedef std::multimap<BOOST_DEDUCED_TYPENAME X::key_type,
BOOST_DEDUCED_TYPENAME X::mapped_type,
BOOST_DEDUCED_TYPENAME
equals_to_compare<BOOST_DEDUCED_TYPENAME X::key_equal>::type>
typedef std::multimap<typename X::key_type, typename X::mapped_type,
typename equals_to_compare<typename X::key_equal>::type>
type;
};
template <class X> class ordered : public ordered_base<X>::type
{
typedef BOOST_DEDUCED_TYPENAME ordered_base<X>::type base;
typedef typename ordered_base<X>::type base;
public:
typedef BOOST_DEDUCED_TYPENAME base::key_compare key_compare;
typedef typename base::key_compare key_compare;
ordered() : base() {}
@@ -105,12 +99,10 @@ namespace test {
void compare(X const& x) { compare_range(x, *this); }
void compare_key(
X const& x, BOOST_DEDUCED_TYPENAME X::value_type const& val)
void compare_key(X const& x, typename X::value_type const& val)
{
compare_pairs(x.equal_range(get_key<X>(val)),
this->equal_range(get_key<X>(val)),
(BOOST_DEDUCED_TYPENAME X::value_type*)0);
this->equal_range(get_key<X>(val)), (typename X::value_type*)0);
}
template <class It> void insert_range(It b, It e)
@@ -123,10 +115,9 @@ namespace test {
};
template <class Equals>
BOOST_DEDUCED_TYPENAME equals_to_compare<Equals>::type create_compare(
Equals const&)
typename equals_to_compare<Equals>::type create_compare(Equals const&)
{
BOOST_DEDUCED_TYPENAME equals_to_compare<Equals>::type x;
typename equals_to_compare<Equals>::type x;
return x;
}