Junxiao Shi | c97d5d4 | 2014-11-27 09:33:37 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
| 3 | def 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 | |
| 12 | def configure(conf): |
| 13 | checkForTypeProperty(conf, 'is_default_constructible', 'int') |
| 14 | checkForTypeProperty(conf, 'is_move_constructible', 'int') |
| 15 | checkForTypeProperty(conf, 'is_move_assignable', 'int') |