2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-26 07:02:12 +00:00

Merge pull request #21 from jhunold/fix_shadow

Fix: clang trunk: "error: declaration of T shadows template parameter"
This commit is contained in:
Raffi Enficiaud
2014-12-11 09:47:48 +01:00

View File

@@ -76,7 +76,7 @@ namespace ut_detail {
struct has_member_size {
private:
struct nil_t;
template<typename T> static auto test(T*) -> decltype( boost::declval<T>().size() );
template<typename U> static auto test(U*) -> decltype( boost::declval<U>().size() );
template<typename> static nil_t test(...);
public:
@@ -87,7 +87,7 @@ namespace ut_detail {
struct has_member_begin {
private:
struct nil_t;
template<typename T> static auto test(T*) -> decltype( boost::declval<T>().begin() );
template<typename U> static auto test(U*) -> decltype( boost::declval<U>().begin() );
template<typename> static nil_t test(...);
public:
static bool const value = !std::is_same< decltype(test<T>(nullptr)), nil_t>::value;