blob: a895e072a73b2b37e8f2cd21c33818b5c5bbd695 [file] [log] [blame]
Junxiao Shic97d5d42014-11-27 09:33:37 -07001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
3def checkForTypeProperty(conf, prop, tparams):
4 if conf.check_cxx(msg=('Checking for std::%s' % prop),
5 fragment=('#include <type_traits>\nstatic_assert(std::%s<%s>::value, "");' %
6 (prop, tparams)),
7 features='cxx', mandatory=False):
8 define = 'HAVE_' + prop.upper()
9 conf.define(define, 1)
10 conf.env[define] = True
11
12def configure(conf):
13 checkForTypeProperty(conf, 'is_default_constructible', 'int')
14 checkForTypeProperty(conf, 'is_move_constructible', 'int')
15 checkForTypeProperty(conf, 'is_move_assignable', 'int')