blob: efc4e3d0f73db5e06f1d7a355997e10f51ed4295 [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')
Junxiao Shi88681402015-06-30 09:58:53 -070014 checkForTypeProperty(conf, 'is_nothrow_move_constructible', 'int')
15 checkForTypeProperty(conf, 'is_nothrow_move_assignable', 'int')