caret_analyze_cpp_impl

c++ implementation of caret_analyze