summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/pbd/pbd/stack_allocator.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/pbd/pbd/stack_allocator.h b/libs/pbd/pbd/stack_allocator.h
index d719b5c5f3..9eed081ec0 100644
--- a/libs/pbd/pbd/stack_allocator.h
+++ b/libs/pbd/pbd/stack_allocator.h
@@ -128,17 +128,19 @@ public:
new (p) U ();
}
+#if __cplusplus > 201103L || defined __clang__
template <class U, class A>
- void construct (U* const p, A& a)
+ void construct (U* const p, A* const a)
{
new (p) U (a);
}
-
- template <class U, class A, class B>
- void construct (U* const p, A& a, B& b)
+#else
+ template <class U, class A>
+ void construct (U* const p, A const& a)
{
- new (p) U (a, b);
+ new (p) U (a);
}
+#endif
private:
StackAllocator& operator= (const StackAllocator&);