Fixed clang template issue and changed flags for Clang.