Remove more unnecessary use of boost::type_index.

This commit is contained in:
Vladimir Prus
2015-05-01 19:13:38 +03:00
parent bd1d0bd861
commit 0756d35f8b
2 changed files with 3 additions and 4 deletions

View File

@@ -12,11 +12,10 @@
#include <boost/any.hpp>
#include <boost/function/function1.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/type_index.hpp>
#include <string>
#include <vector>
#include <typeinfo>
#include <limits>
namespace boost { namespace program_options {

View File

@@ -29,12 +29,12 @@ void test_type()
const typed_value_base* b = dynamic_cast<const typed_value_base*>
(desc.find("foo", false).semantic().get());
BOOST_CHECK(b);
BOOST_CHECK(b->value_type() == boost::typeindex::type_id<int>());
BOOST_CHECK(b->value_type() == typeid(int));
const typed_value_base* b2 = dynamic_cast<const typed_value_base*>
(desc.find("bar", false).semantic().get());
BOOST_CHECK(b2);
BOOST_CHECK(b2->value_type() == boost::typeindex::type_id<string>());
BOOST_CHECK(b2->value_type() == typeid(string));
#endif
}