From c749615ad6184976e2bbdf537209a446e01c7eab Mon Sep 17 00:00:00 2001 From: mcarton Date: Sat, 9 May 2015 20:37:13 +0200 Subject: [PATCH] Add a `C++11` rule --- thefuck/rules/c++11.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 thefuck/rules/c++11.py diff --git a/thefuck/rules/c++11.py b/thefuck/rules/c++11.py new file mode 100644 index 00000000..f4d8ab5a --- /dev/null +++ b/thefuck/rules/c++11.py @@ -0,0 +1,11 @@ +def match(command, settings): + return (('g++' in command.script or 'clang++' in command.script) and + ('This file requires compiler and library support for the ' + 'ISO C++ 2011 standard.' in command.stderr or + '-Wc++11-extensions' in command.stderr + ) + ) + + +def get_new_command(command, settings): + return command.script + ' -std=c++11'