Skip to content

Commit 42e7951

Browse files
committed
update assertion
1 parent 2840377 commit 42e7951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/migraphx/any_ptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct any_ptr
5858
T get() const
5959
{
6060
static_assert(std::is_pointer<T>{}, "Must be a pointer");
61-
assert(ptr != nullptr);
61+
assert(not ti or ptr != nullptr);
6262
if(ti and std::type_index{typeid(T)} != *ti)
6363
MIGRAPHX_THROW("any_ptr: type mismatch: " + std::string{name} + " != " + get_name<T>());
6464
else if(name != get_name<T>())

0 commit comments

Comments
 (0)