diff --git a/src/headergenerator.cpp b/src/headergenerator.cpp index 108237d..1efef53 100644 --- a/src/headergenerator.cpp +++ b/src/headergenerator.cpp @@ -129,8 +129,8 @@ bool HeaderGenerator::WriteHeader(char *p_interleafName, std::map= 201103L\nenum Script : int {\n#else\n"; + m_declFout << "#if __cplusplus >= 201103L\nenum Script : int;\n#else\n"; // declare enum m_fout << "enum Script {\n#endif\n"; @@ -154,8 +154,8 @@ bool HeaderGenerator::WriteHeader(char *p_interleafName, std::map= 201103L\nenum Script2 : int {\n#else\nenum Script2 {\n#endif\n"; + m_declFout << "\n#if __cplusplus >= 201103L\nenum Script2 : int;\n#else\nenum Script2;\n#endif\n"; } // actually write the enum entry diff --git a/src/main.cpp b/src/main.cpp index 0e804b9..e237877 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) printf("Successfully generated header for %s\n", filename); } - hgenerator.m_declFout << "#endif // ACTIONSFWD_H"; + hgenerator.m_declFout << "#endif // ACTIONSFWD_H\n"; hgenerator.m_declFout.close(); printf("Finished!\n");