visual studio 2010 - Raise compile error if braces not closed at end of file (C++) -


is there way raise warning or error if c++ compiler comes end of file without braces being closed? never use headers spill scope file , receive compiler warnings if happens accident. compiler msvc 2010, others might of interest too.

// utilities.hpp namespace example {  class utilities { }  //<eof> -> should warn or error 

edit: willing put marker/pragma/macro @ end of each file, know brace level should 0.

a reasonable method

#define at_global_scope namespace { } 

because can appear @ global or namespace scope. unfortunately won't catch missing } namespace, catch class-case, missing parentheses , semicolons.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -