Skip to content
Snippets Groups Projects
Commit d344e7a5 authored by Christian Engwer's avatar Christian Engwer
Browse files

"return type" of the macro was ambiguous

[[Imported from SVN: r3629]]
parent 3ce1bd31
No related branches found
No related tags found
No related merge requests found
...@@ -37,9 +37,13 @@ namespace Dune ...@@ -37,9 +37,13 @@ namespace Dune
char padding2[N2]; char padding2[N2];
}; };
#define ALIGNMENT_MODULO(a, b) ((a) % (b) == 0 ? (b) : (a) % (b)) #define ALIGNMENT_MODULO(a, b) (a % b == 0 ? \
static_cast<std::size_t>(b) : \
static_cast<std::size_t>(a % b))
#define ALIGNMENT_MIN(a, b) (static_cast<std::size_t>(a) < \ #define ALIGNMENT_MIN(a, b) (static_cast<std::size_t>(a) < \
static_cast<std::size_t>(b) ? (a) : (b)) static_cast<std::size_t>(b) ? \
static_cast<std::size_t>(a) : \
static_cast<std::size_t>(b))
template <class T, std::size_t N> template <class T, std::size_t N>
struct AlignmentTester struct AlignmentTester
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment