mirror of
https://github.com/boostorg/typeof.git
synced 2026-05-04 20:04:13 +02:00
_TPL-related fixes
[SVN r2613]
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user