Skip to content

Commit

Permalink
Merge pull request #394 from leapmotion/fix-is_constructable
Browse files Browse the repository at this point in the history
Add 'is_constructable' to shim
  • Loading branch information
codemercenary committed Feb 4, 2015
2 parents f8557c6 + 235219b commit a386354
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions autowiring/C++11/boost_type_traits.h
Expand Up @@ -53,4 +53,15 @@ namespace std {
{
typedef _Type type;
};

template<class T, class... Args>
struct is_constructible {
template<class U>
static std::true_type select(decltype(U(*static_cast<typename remove_reference<Args>::type*>(nullptr)...))*);

template<class U>
static std::false_type select(...);

static const bool value = decltype(select<T>(static_cast<T*>(nullptr)))::value;
};
}

0 comments on commit a386354

Please sign in to comment.