Skip to content

Commit

Permalink
ENH: define VCL_CONSTEXPR in configured file
Browse files Browse the repository at this point in the history
We need a consistent definition of VCL_CONSTEXPR in
vcl/vcl_config_compiler.h.in for external projects
that may include this file.
  • Loading branch information
hjmjohnson committed Jan 14, 2016
1 parent abc3883 commit d4f530a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vcl/vcl_config_compiler.h.in
Expand Up @@ -87,6 +87,18 @@
//----------------------------------------------------------------------
// constant initializer issues.

/* When using C++11 or greater, constexpr
* may be necessary for static const float initialization
* and is benificial in other cases where
* a value can be constant. */
#if __cplusplus >= 201103L
# define VCL_CONSTEXPR constexpr
# define VCL_CAN_STATIC_CONST_INIT_INT 1
# define VCL_CAN_STATIC_CONST_INIT_FLOAT 1
#else
# define VCL_CONSTEXPR const
#endif

//: VCL_STATIC_CONST_INIT_INT_DECL(x)
//
// ANSI allows
Expand Down

0 comments on commit d4f530a

Please sign in to comment.