Use named capture in compile