incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject Inconsistent indentation in preprocessing directives
Date Fri, 13 Jun 2008 19:04:52 GMT
 
I was just looking at the indentation in the
$TOPDIR/include/rw/_static_assert.h header.  Why are the defines within
the `#ifndef _RWSTD_NO_STATIC_ASSERT' indented but the directives
outside this #if/#else/#endif block are not?  Should they all be
indented uniformly or not indented at all?

I realize this is not conventional but if we want to indent
preprocessing directives, this file should look like this:

	#ifndef _RWSTD_RW_STATIC_ASSERT_H_INCLUDED
	#  define _RWSTD_RW_STATIC_ASSERT_H_INCLUDED

	#  include <rw/_defs.h>

	...

	#  ifndef _RWSTD_NO_STATIC_ASSERT
	#    define _RWSTD_STATIC_ASSERT(Cond)
	...
	#  else
	#    define _RWSTD_STATIC_ASSERT(Cond,Mesg) static_assert(Cond,
Mesg)
	#  endif   // _RWSTD_NO_STATIC_ASSERT

	#endif   // _RWSTD_RW_STATIC_ASSERT_H_INCLUDED

Otherwise, we shouldn't indent at all.

Thanks,
Brad.

Mime
View raw message