例:
#include <iostream>
#include <boost/call_traits.hpp>
#include <type_traits>
boost::call_traits<int>::param_type f()
{
return 1;
}
int main()
{
std::cout << std::boolalpha;
std::cout <<
std::is_const<boost::call_traits<int>::param_type>::value
<< std::endl; // true
std::cout << std::is_const<decltype(f())>::value << std::endl; // false
}
質問:
私が何か間違ったことをしていない限り、両方を取得する必要があると思いますtrue
が、gcc 4.7.0false
は後者を出力します。足りないものはありますか?