Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | // Copyright (C) 2010 Peder Holt |
| 2 | // Use, modification and distribution is subject to the Boost Software |
| 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) |
| 4 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 5 | #ifndef NDNBOOST_TYPEOF_UNSUPPORTED_HPP_INCLUDED |
| 6 | #define NDNBOOST_TYPEOF_UNSUPPORTED_HPP_INCLUDED |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 7 | |
| 8 | namespace ndnboost { namespace type_of { |
| 9 | struct typeof_emulation_is_unsupported_on_this_compiler {}; |
| 10 | }} |
| 11 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 12 | #define NDNBOOST_TYPEOF(expr) ndnboost::type_of::typeof_emulation_is_unsupported_on_this_compiler |
| 13 | #define NDNBOOST_TYPEOF_TPL NDNBOOST_TYPEOF |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 14 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 15 | #define NDNBOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 16 | struct name {\ |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 17 | typedef NDNBOOST_TYPEOF_TPL(expr) type;\ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 18 | }; |
| 19 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 20 | #define NDNBOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 21 | struct name {\ |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 22 | typedef NDNBOOST_TYPEOF(expr) type;\ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 26 | #define NDNBOOST_TYPEOF_REGISTER_TYPE(x) |
| 27 | #define NDNBOOST_TYPEOF_REGISTER_TEMPLATE(x, params) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 28 | |
| 29 | #endif |