_TPL-related fixes

[SVN r2613]
This commit is contained in:
Arkadiy Vertleyb
2005-06-08 02:57:29 +00:00
parent bd6c0e07c4
commit cdc03862c9
5 changed files with 82 additions and 15 deletions
+26
View File
@@ -205,6 +205,27 @@ void lvalue_typeof_test()
//BOOST_STATIC_ASSERT((boost::is_same<BOOST_LVALUE_TYPEOF(21), int>::value)); //msvc
BOOST_STATIC_ASSERT((boost::is_same<BOOST_LVALUE_TYPEOF(int(21)), int>::value));
}
namespace ltype
{
int& foo(double);
char foo(int);
template<class T>
struct result_type
{
typedef typename BOOST_LVALUE_TYPEOF(foo(T())) type;
};
BOOST_STATIC_ASSERT((boost::is_same<
result_type<int>::type,
char
>::value));
BOOST_STATIC_ASSERT((boost::is_same<
result_type<double>::type,
int&
>::value));
};
#define BOOST_TYPEOF_TEXT "Noncopyable..."
#include <boost/typeof/message.hpp>
@@ -331,6 +352,11 @@ void odr_test()
odr_test2();
}
#define BOOST_TYPEOF_TEXT "native/emulation consistency..."
#include <boost/typeof/message.hpp>
BOOST_STATIC_ASSERT((is_same<BOOST_TYPEOF(int()), int>::value));
#define BOOST_TYPEOF_TEXT "main()..."
#include <boost/typeof/message.hpp>
+1 -1
View File
@@ -37,7 +37,7 @@ void odr_test2();
template<class T, class U>
typename sum_t<T,U>::result_type sum_t<T,U>::operator()()
{
// BOOST_AUTO_TPL(result, m_sum);
//BOOST_AUTO_TPL(result, m_sum);
return m_sum;
}