Commit a3a9e469 authored by Paul's avatar Paul
Browse files

Formatting

parent ab9a6dea
...@@ -149,27 +149,26 @@ void run_verify_program() ...@@ -149,27 +149,26 @@ void run_verify_program()
std::set_terminate(nullptr); std::set_terminate(nullptr);
} }
template<class T> template <class T>
int auto_register_verify_program() int auto_register_verify_program()
{ {
test::add_test_case(migraphx::get_type_name<T>(), [] { run_verify_program<T>(); }); test::add_test_case(migraphx::get_type_name<T>(), [] { run_verify_program<T>(); });
return 0; return 0;
} }
template<class T> template <class T>
struct verify_program struct verify_program
{ {
static int static_register; static int static_register;
// This typedef ensures that the static member will be instantiated if // This typedef ensures that the static member will be instantiated if
// the class itself is instantiated // the class itself is instantiated
using static_register_type = std::integral_constant<decltype(&static_register), &static_register>; using static_register_type =
std::integral_constant<decltype(&static_register), &static_register>;
}; };
template<class T> template <class T>
int verify_program<T>::static_register = auto_register_verify_program<T>(); int verify_program<T>::static_register = auto_register_verify_program<T>();
struct test_literals : verify_program<test_literals> struct test_literals : verify_program<test_literals>
{ {
migraphx::program create_program() const migraphx::program create_program() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment