encoding: ensure Buffer is move constructible and assignable
refs #2234
Change-Id: Ic16914eff91bcbae89b6a66c5870a57086d9511a
diff --git a/.waf-tools/type_traits.py b/.waf-tools/type_traits.py
new file mode 100644
index 0000000..a895e07
--- /dev/null
+++ b/.waf-tools/type_traits.py
@@ -0,0 +1,15 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def checkForTypeProperty(conf, prop, tparams):
+ if conf.check_cxx(msg=('Checking for std::%s' % prop),
+ fragment=('#include <type_traits>\nstatic_assert(std::%s<%s>::value, "");' %
+ (prop, tparams)),
+ features='cxx', mandatory=False):
+ define = 'HAVE_' + prop.upper()
+ conf.define(define, 1)
+ conf.env[define] = True
+
+def configure(conf):
+ checkForTypeProperty(conf, 'is_default_constructible', 'int')
+ checkForTypeProperty(conf, 'is_move_constructible', 'int')
+ checkForTypeProperty(conf, 'is_move_assignable', 'int')