| 596 | #pragma GCC diagnostic ignored "-Wpragmas" |
| 597 | #pragma GCC diagnostic ignored "-Wundefined-var-template" |
| 598 | static SelfType downcast_from(DType dtype) { |
| 599 | if (dtype.enumv() != type_enum) { |
| 600 | dtype.on_assert_is_failed(sm_trait.name); |
| 601 | } |
| 602 | return ParameterizedDType(dtype); |
| 603 | } |
| 604 | #pragma GCC diagnostic pop |
| 605 | |
| 606 | const DTypeParam<SelfType>& param() { return static_cast<Trait*>(m_trait)->param; } |