[const_ptr] Add patterns.