Skip to content

Commit

Permalink
disable some warnings that might be leaked into use code by condition…
Browse files Browse the repository at this point in the history
…al redefinition of LibFlatArray macros for MSVC, re #27
  • Loading branch information
gentryx committed Mar 2, 2017
1 parent 704204d commit ff6a6ea
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion include/libflatarray/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,37 @@
template<typename CELL_TYPE, long R> \
friend class LibFlatArray::detail::flat_array::offset;



#ifdef _MSC_BUILD
/**
* This macros registers a type with LibFlatArray so that it can be
* used with soa_grid, soa_array and friends. It will instantiate all
* templates required for the "Struct of Arrays" (SoA) storage and
* adds utilities so that user code can also discover properties of
* the SoA layout.
*/
# define LIBFLATARRAY_REGISTER_SOA(CELL_TYPE, CELL_MEMBERS) \
__pragma( warning( push ) ) \
__pragma( warning( disable : 4514 ) ) \
LIBFLATARRAY_REGISTER_SOA_MAIN(CELL_TYPE, CELL_MEMBERS) \
__pragma( warning( pop ) ) \

#else

/**
* This macros registers a type with LibFlatArray so that it can be
* used with soa_grid, soa_array and friends. It will instantiate all
* templates required for the "Struct of Arrays" (SoA) storage and
* adds utilities so that user code can also discover properties of
* the SoA layout.
*/
#define LIBFLATARRAY_REGISTER_SOA(CELL_TYPE, CELL_MEMBERS) \
# define LIBFLATARRAY_REGISTER_SOA(CELL_TYPE, CELL_MEMBERS) \
LIBFLATARRAY_REGISTER_SOA_MAIN(CELL_TYPE, CELL_MEMBERS) \

#endif

#define LIBFLATARRAY_REGISTER_SOA_MAIN(CELL_TYPE, CELL_MEMBERS) \
namespace LibFlatArray { \
\
LIBFLATARRAY_FOR_EACH( \
Expand Down

0 comments on commit ff6a6ea

Please sign in to comment.