Skip to content

Commit

Permalink
Restore comment, fix bad variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Gray committed May 18, 2017
1 parent e0a5b7f commit 1d1171e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/autowiring/has_static_new.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

namespace autowiring {

/// <summary>
/// Utility helper structure for types which have a factory New routine
/// </summary>
/// <remarks>
/// A factory New routine is malformed when the return type is not implicitly castable to type T
/// </remarks>
template <class T, typename... Args>
class has_static_new
{
Expand All @@ -13,6 +19,7 @@ class has_static_new
std::is_convertible<decltype(U::New(std::declval<Args>()...)), T*>::value
>::type>
static std::true_type check(void*);

template <class...>
static std::false_type check(...);
public:
Expand Down
2 changes: 1 addition & 1 deletion src/autowiring/test/AutoConstructTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,5 @@ static_assert(
);

TEST_F(AutoConstructTest, MultiStaticNewTest) {
AutoConstruct<MultiStaticNew> badstatic{ 1 };
AutoConstruct<MultiStaticNew> multistatic{ 1 };
}

0 comments on commit 1d1171e

Please sign in to comment.