zemu 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/zemu/config.rb +312 -0
- data/lib/zemu/instance.rb +179 -0
- data/lib/zemu.rb +172 -0
- data/src/debug.c +118 -0
- data/src/debug.h +30 -0
- data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
- data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
- data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
- data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
- data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
- data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
- data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
- data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
- data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
- data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
- data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
- data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
- data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
- data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
- data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
- data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
- data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
- data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
- data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
- data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
- data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
- data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
- data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
- data/src/external/Z/API/Z/constants/base.h +35 -0
- data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
- data/src/external/Z/API/Z/constants/numbers.h +963 -0
- data/src/external/Z/API/Z/constants/version.h +15 -0
- data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
- data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
- data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
- data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
- data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
- data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
- data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
- data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
- data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
- data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
- data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
- data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
- data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
- data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
- data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
- data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
- data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
- data/src/external/Z/API/Z/functions/base/all.h +16 -0
- data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
- data/src/external/Z/API/Z/functions/base/character.h +38 -0
- data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
- data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
- data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
- data/src/external/Z/API/Z/functions/base/value.h +1901 -0
- data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
- data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
- data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
- data/src/external/Z/API/Z/functions/time/date.h +29 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
- data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
- data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
- data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
- data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
- data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
- data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
- data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
- data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
- data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
- data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
- data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
- data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
- data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
- data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
- data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
- data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
- data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
- data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
- data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
- data/src/external/Z/API/Z/inspection/C++.h +78 -0
- data/src/external/Z/API/Z/inspection/C.h +79 -0
- data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
- data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
- data/src/external/Z/API/Z/inspection/CPU.h +209 -0
- data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
- data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
- data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
- data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
- data/src/external/Z/API/Z/inspection/OS.h +236 -0
- data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
- data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
- data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
- data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
- data/src/external/Z/API/Z/inspection/Z.h +19 -0
- data/src/external/Z/API/Z/inspection/build.h +22 -0
- data/src/external/Z/API/Z/inspection/character set.h +66 -0
- data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
- data/src/external/Z/API/Z/inspection/compiler.h +299 -0
- data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
- data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
- data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
- data/src/external/Z/API/Z/inspection/data model.h +362 -0
- data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
- data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
- data/src/external/Z/API/Z/inspection/language.h +163 -0
- data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
- data/src/external/Z/API/Z/inspection/platform.h +29 -0
- data/src/external/Z/API/Z/keys/C++.h +27 -0
- data/src/external/Z/API/Z/keys/C.h +29 -0
- data/src/external/Z/API/Z/keys/CPU.h +80 -0
- data/src/external/Z/API/Z/keys/OS.h +182 -0
- data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
- data/src/external/Z/API/Z/keys/chemistry.h +26 -0
- data/src/external/Z/API/Z/keys/compiler.h +178 -0
- data/src/external/Z/API/Z/keys/data model.h +32 -0
- data/src/external/Z/API/Z/keys/endianness.h +24 -0
- data/src/external/Z/API/Z/keys/language.h +21 -0
- data/src/external/Z/API/Z/keys/layout.h +20 -0
- data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
- data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
- data/src/external/Z/API/Z/keys/order.h +18 -0
- data/src/external/Z/API/Z/keys/platform.h +87 -0
- data/src/external/Z/API/Z/keys/program.h +39 -0
- data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
- data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
- data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
- data/src/external/Z/API/Z/keys/status.h +69 -0
- data/src/external/Z/API/Z/keys/text.h +27 -0
- data/src/external/Z/API/Z/keys/value.h +88 -0
- data/src/external/Z/API/Z/macros/arguments.h +25 -0
- data/src/external/Z/API/Z/macros/casting.h +22 -0
- data/src/external/Z/API/Z/macros/character.h +159 -0
- data/src/external/Z/API/Z/macros/date.h +14 -0
- data/src/external/Z/API/Z/macros/key.h +20 -0
- data/src/external/Z/API/Z/macros/language.h +126 -0
- data/src/external/Z/API/Z/macros/language.hpp +81 -0
- data/src/external/Z/API/Z/macros/members.h +86 -0
- data/src/external/Z/API/Z/macros/pasting.h +308 -0
- data/src/external/Z/API/Z/macros/pointer.h +33 -0
- data/src/external/Z/API/Z/macros/repetition.h +283 -0
- data/src/external/Z/API/Z/macros/structure.h +104 -0
- data/src/external/Z/API/Z/macros/templating.h +407 -0
- data/src/external/Z/API/Z/macros/tokens.h +14 -0
- data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
- data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
- data/src/external/Z/API/Z/macros/value.h +489 -0
- data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
- data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
- data/src/external/Z/API/Z/macros/variadic.h +46 -0
- data/src/external/Z/API/Z/macros/version.h +17 -0
- data/src/external/Z/API/Z/network/3/IP.h +36 -0
- data/src/external/Z/API/Z/network/4/TCP.h +24 -0
- data/src/external/Z/API/Z/network/4/UDP.h +26 -0
- data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
- data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
- data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
- data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
- data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
- data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
- data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
- data/src/external/Z/API/Z/traits/base.hpp +19 -0
- data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
- data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
- data/src/external/Z/API/Z/types/arguments.h +19 -0
- data/src/external/Z/API/Z/types/base.h +1655 -0
- data/src/external/Z/API/Z/types/base.hpp +169 -0
- data/src/external/Z/API/Z/types/buffering.h +27 -0
- data/src/external/Z/API/Z/types/mathematics.h +135 -0
- data/src/external/Z/API/Z/types/time.h +23 -0
- data/src/external/Z/COPYING.LESSER +165 -0
- data/src/external/Z/development/Qt Creator/Z.pro +253 -0
- data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
- data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
- data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
- data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
- data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
- data/src/external/z80/README.md +229 -0
- data/src/external/z80/building/premake4.lua +33 -0
- data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
- data/src/external/z80/sources/Z80.c +1660 -0
- data/src/interrupt.c +6 -0
- data/src/interrupt.h +3 -0
- data/src/io.c.erb +115 -0
- data/src/io.h.erb +18 -0
- data/src/main.c +69 -0
- data/src/memory.c.erb +43 -0
- data/src/memory.h.erb +9 -0
- metadata +329 -0
@@ -0,0 +1,4516 @@
|
|
1
|
+
/* Z Kit - traits/Type.hpp
|
2
|
+
_____ _______________
|
3
|
+
/_ /_/ -_/_ _/ _ |
|
4
|
+
/____/\___/ /__//___/_| Kit
|
5
|
+
Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
|
6
|
+
Copyright (C) 2018 Ortega Sosa, Sofía.
|
7
|
+
Released under the terms of the GNU Lesser General Public License v3. */
|
8
|
+
|
9
|
+
#ifndef _Z_traits_Type_HPP_
|
10
|
+
#define _Z_traits_Type_HPP_
|
11
|
+
|
12
|
+
#include <Z/keys/mathematics/number.h>
|
13
|
+
#include <Z/inspection/Z.h>
|
14
|
+
#include <Z/traits/base.hpp>
|
15
|
+
#include <Z/traits/TernaryType.hpp>
|
16
|
+
#include <Z/traits/TypeList.hpp>
|
17
|
+
|
18
|
+
#if !Z_HAS_TRAIT(TypeList)
|
19
|
+
# include <Z/traits/SelectType.hpp>
|
20
|
+
|
21
|
+
# if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
22
|
+
# include <Z/traits/TypeCount.hpp>
|
23
|
+
# endif
|
24
|
+
#endif
|
25
|
+
|
26
|
+
#if Z_COMPILER_HAS_MAGIC_CONSTANT(MANGLED_FUNCTION_NAME) && \
|
27
|
+
Z_LANGUAGE_HAS(CPP, CPP14_RULES_ON_CONSTANT_EXPRESSION_FUNCTION)
|
28
|
+
|
29
|
+
# include <Z/functions/base/type.hpp>
|
30
|
+
# include <Z/classes/base/Symbol.hpp>
|
31
|
+
#endif
|
32
|
+
|
33
|
+
// MARK: - Component availability configuration
|
34
|
+
|
35
|
+
//-------------------------------------------------.
|
36
|
+
// Components that are only available if the types |
|
37
|
+
// to which they refer are supported or enabled. |
|
38
|
+
//-------------------------------------------------'
|
39
|
+
|
40
|
+
#if Z_UINT8_VALUE_TYPE == Z_VALUE_TYPE_UINT8
|
41
|
+
# define Z_HAS_TRAIT_TypeIsUInt8 TRUE
|
42
|
+
# define Z_TRAIT_Type_HAS_is_uint8 TRUE
|
43
|
+
#else
|
44
|
+
# define Z_HAS_TRAIT_TypeIsUInt8 FALSE
|
45
|
+
# define Z_TRAIT_Type_HAS_is_uint8 FALSE
|
46
|
+
#endif
|
47
|
+
|
48
|
+
#if Z_SINT8_VALUE_TYPE == Z_VALUE_TYPE_SINT8
|
49
|
+
# define Z_HAS_TRAIT_TypeIsSInt8 TRUE
|
50
|
+
# define Z_TRAIT_Type_HAS_is_sint8 TRUE
|
51
|
+
#else
|
52
|
+
# define Z_HAS_TRAIT_TypeIsSInt8 FALSE
|
53
|
+
# define Z_TRAIT_Type_HAS_is_sint8 FALSE
|
54
|
+
#endif
|
55
|
+
|
56
|
+
#if Z_UINT16_VALUE_TYPE == Z_VALUE_TYPE_UINT16
|
57
|
+
# define Z_HAS_TRAIT_TypeIsUInt16 TRUE
|
58
|
+
# define Z_TRAIT_Type_HAS_is_uint16 TRUE
|
59
|
+
#else
|
60
|
+
# define Z_HAS_TRAIT_TypeIsUInt16 FALSE
|
61
|
+
# define Z_TRAIT_Type_HAS_is_uint16 FALSE
|
62
|
+
#endif
|
63
|
+
|
64
|
+
#if Z_SINT16_VALUE_TYPE == Z_VALUE_TYPE_SINT16
|
65
|
+
# define Z_HAS_TRAIT_TypeIsSInt16 TRUE
|
66
|
+
# define Z_TRAIT_Type_HAS_is_sint16 TRUE
|
67
|
+
#else
|
68
|
+
# define Z_HAS_TRAIT_TypeIsSInt16 FALSE
|
69
|
+
# define Z_TRAIT_Type_HAS_is_sint16 FALSE
|
70
|
+
#endif
|
71
|
+
|
72
|
+
#if defined(Z_UINT32) && Z_UINT32_VALUE_TYPE == Z_VALUE_TYPE_UINT32
|
73
|
+
# define Z_HAS_TRAIT_TypeIsUInt32 TRUE
|
74
|
+
# define Z_TRAIT_Type_HAS_is_uint32 TRUE
|
75
|
+
#else
|
76
|
+
# define Z_HAS_TRAIT_TypeIsUInt32 FALSE
|
77
|
+
# define Z_TRAIT_Type_HAS_is_uint32 FALSE
|
78
|
+
#endif
|
79
|
+
|
80
|
+
#if defined(Z_SINT32) && Z_SINT32_VALUE_TYPE == Z_VALUE_TYPE_SINT32
|
81
|
+
# define Z_HAS_TRAIT_TypeIsSInt32 TRUE
|
82
|
+
# define Z_TRAIT_Type_HAS_is_sint32 TRUE
|
83
|
+
#else
|
84
|
+
# define Z_HAS_TRAIT_TypeIsSInt32 FALSE
|
85
|
+
# define Z_TRAIT_Type_HAS_is_sint32 FALSE
|
86
|
+
#endif
|
87
|
+
|
88
|
+
#if defined(Z_UINT64) && Z_UINT64_VALUE_TYPE == Z_VALUE_TYPE_UINT64
|
89
|
+
# define Z_HAS_TRAIT_TypeIsUInt64 TRUE
|
90
|
+
# define Z_TRAIT_Type_HAS_is_uint64 TRUE
|
91
|
+
#else
|
92
|
+
# define Z_HAS_TRAIT_TypeIsUInt64 FALSE
|
93
|
+
# define Z_TRAIT_Type_HAS_is_uint64 FALSE
|
94
|
+
#endif
|
95
|
+
|
96
|
+
#if defined(Z_SINT64) && Z_SINT64_VALUE_TYPE == Z_VALUE_TYPE_SINT64
|
97
|
+
# define Z_HAS_TRAIT_TypeIsSInt64 TRUE
|
98
|
+
# define Z_TRAIT_Type_HAS_is_sint64 TRUE
|
99
|
+
#else
|
100
|
+
# define Z_HAS_TRAIT_TypeIsSInt64 FALSE
|
101
|
+
# define Z_TRAIT_Type_HAS_is_sint64 FALSE
|
102
|
+
#endif
|
103
|
+
|
104
|
+
#if defined(Z_UINT128) && Z_UINT128_VALUE_TYPE == Z_VALUE_TYPE_UINT128
|
105
|
+
# define Z_HAS_TRAIT_TypeIsUInt128 TRUE
|
106
|
+
# define Z_TRAIT_Type_HAS_is_uint128 TRUE
|
107
|
+
#else
|
108
|
+
# define Z_HAS_TRAIT_TypeIsUInt128 FALSE
|
109
|
+
# define Z_TRAIT_Type_HAS_is_uint128 FALSE
|
110
|
+
#endif
|
111
|
+
|
112
|
+
#if defined(Z_SINT128) && Z_SINT128_VALUE_TYPE == Z_VALUE_TYPE_SINT128
|
113
|
+
# define Z_HAS_TRAIT_TypeIsSInt128 TRUE
|
114
|
+
# define Z_TRAIT_Type_HAS_is_sint128 TRUE
|
115
|
+
#else
|
116
|
+
# define Z_HAS_TRAIT_TypeIsSInt128 FALSE
|
117
|
+
# define Z_TRAIT_Type_HAS_is_sint128 FALSE
|
118
|
+
#endif
|
119
|
+
|
120
|
+
#if defined(Z_FLOAT16) && Z_FLOAT16_VALUE_TYPE == Z_VALUE_TYPE_FLOAT16
|
121
|
+
# define Z_HAS_TRAIT_TypeIsFloat16 TRUE
|
122
|
+
# define Z_TRAIT_Type_HAS_is_float16 TRUE
|
123
|
+
#else
|
124
|
+
# define Z_HAS_TRAIT_TypeIsFloat16 FALSE
|
125
|
+
# define Z_TRAIT_Type_HAS_is_float16 FALSE
|
126
|
+
#endif
|
127
|
+
|
128
|
+
#if defined(Z_FLOAT32) && Z_FLOAT32_VALUE_TYPE == Z_VALUE_TYPE_FLOAT32
|
129
|
+
# define Z_HAS_TRAIT_TypeIsFloat32 TRUE
|
130
|
+
# define Z_TRAIT_Type_HAS_is_float32 TRUE
|
131
|
+
#else
|
132
|
+
# define Z_HAS_TRAIT_TypeIsFloat32 FALSE
|
133
|
+
# define Z_TRAIT_Type_HAS_is_float32 FALSE
|
134
|
+
#endif
|
135
|
+
|
136
|
+
#if defined(Z_FLOAT64) && Z_FLOAT64_VALUE_TYPE == Z_VALUE_TYPE_FLOAT64
|
137
|
+
# define Z_HAS_TRAIT_TypeIsFloat64 TRUE
|
138
|
+
# define Z_TRAIT_Type_HAS_is_float64 TRUE
|
139
|
+
#else
|
140
|
+
# define Z_HAS_TRAIT_TypeIsFloat64 FALSE
|
141
|
+
# define Z_TRAIT_Type_HAS_is_float64 FALSE
|
142
|
+
#endif
|
143
|
+
|
144
|
+
#if defined(Z_FLOAT128) && Z_FLOAT128_VALUE_TYPE == Z_VALUE_TYPE_FLOAT128
|
145
|
+
# define Z_HAS_TRAIT_TypeIsFloat128 TRUE
|
146
|
+
# define Z_TRAIT_Type_HAS_is_float128 TRUE
|
147
|
+
#else
|
148
|
+
# define Z_HAS_TRAIT_TypeIsFloat128 FALSE
|
149
|
+
# define Z_TRAIT_Type_HAS_is_float128 FALSE
|
150
|
+
#endif
|
151
|
+
|
152
|
+
#if defined(Z_FLOAT80_X87) && Z_FLOAT80_X87_VALUE_TYPE == Z_VALUE_TYPE_FLOAT80_X87
|
153
|
+
# define Z_HAS_TRAIT_TypeIsFloat80_x87 TRUE
|
154
|
+
# define Z_TRAIT_Type_HAS_is_float80_x87 TRUE
|
155
|
+
#else
|
156
|
+
# define Z_HAS_TRAIT_TypeIsFloat80_x87 FALSE
|
157
|
+
# define Z_TRAIT_Type_HAS_is_float80_x87 FALSE
|
158
|
+
#endif
|
159
|
+
|
160
|
+
#if defined(Z_FLOAT96_X87) && Z_FLOAT96_X87_VALUE_TYPE == Z_VALUE_TYPE_FLOAT96_X87
|
161
|
+
# define Z_HAS_TRAIT_TypeIsFloat96_x87 TRUE
|
162
|
+
# define Z_TRAIT_Type_HAS_is_float96_x87 TRUE
|
163
|
+
#else
|
164
|
+
# define Z_HAS_TRAIT_TypeIsFloat96_x87 FALSE
|
165
|
+
# define Z_TRAIT_Type_HAS_is_float96_x87 FALSE
|
166
|
+
#endif
|
167
|
+
|
168
|
+
#if defined(Z_FLOAT128_X87) && Z_FLOAT128_X87_VALUE_TYPE == Z_VALUE_TYPE_FLOAT128_X87
|
169
|
+
# define Z_HAS_TRAIT_TypeIsFloat128_x87 TRUE
|
170
|
+
# define Z_TRAIT_Type_HAS_is_float128_x87 TRUE
|
171
|
+
#else
|
172
|
+
# define Z_HAS_TRAIT_TypeIsFloat128_x87 FALSE
|
173
|
+
# define Z_TRAIT_Type_HAS_is_float128_x87 FALSE
|
174
|
+
#endif
|
175
|
+
|
176
|
+
#ifdef Z_LLONG
|
177
|
+
# define Z_HAS_TRAIT_TypeIsSLLong TRUE
|
178
|
+
# define Z_HAS_TRAIT_TypeIsULLong TRUE
|
179
|
+
# define Z_TRAIT_Type_HAS_is_sllong TRUE
|
180
|
+
# define Z_TRAIT_Type_HAS_is_ullong TRUE
|
181
|
+
#else
|
182
|
+
# define Z_HAS_TRAIT_TypeIsSLLong FALSE
|
183
|
+
# define Z_HAS_TRAIT_TypeIsULLong FALSE
|
184
|
+
# define Z_TRAIT_Type_HAS_is_sllong FALSE
|
185
|
+
# define Z_TRAIT_Type_HAS_is_ullong FALSE
|
186
|
+
#endif
|
187
|
+
|
188
|
+
#ifdef Z_FLOAT
|
189
|
+
# define Z_HAS_TRAIT_TypeIsFloat TRUE
|
190
|
+
# define Z_TRAIT_Type_HAS_is_float TRUE
|
191
|
+
#else
|
192
|
+
# define Z_HAS_TRAIT_TypeIsFloat FALSE
|
193
|
+
# define Z_TRAIT_Type_HAS_is_float FALSE
|
194
|
+
#endif
|
195
|
+
|
196
|
+
#ifdef Z_DOUBLE
|
197
|
+
# define Z_HAS_TRAIT_TypeIsDouble TRUE
|
198
|
+
# define Z_TRAIT_Type_HAS_is_double TRUE
|
199
|
+
#else
|
200
|
+
# define Z_HAS_TRAIT_TypeIsDouble FALSE
|
201
|
+
# define Z_TRAIT_Type_HAS_is_double FALSE
|
202
|
+
#endif
|
203
|
+
|
204
|
+
#ifdef Z_LDOUBLE
|
205
|
+
# define Z_HAS_TRAIT_TypeIsLDouble TRUE
|
206
|
+
# define Z_TRAIT_Type_HAS_is_ldouble TRUE
|
207
|
+
#else
|
208
|
+
# define Z_HAS_TRAIT_TypeIsLDouble FALSE
|
209
|
+
# define Z_TRAIT_Type_HAS_is_ldouble FALSE
|
210
|
+
#endif
|
211
|
+
|
212
|
+
#if Z_LANGUAGE_HAS_TYPE(CPP, BOOLEAN)
|
213
|
+
# define Z_HAS_TRAIT_TypeIsBoolean TRUE
|
214
|
+
# define Z_TRAIT_Type_HAS_is_boolean TRUE
|
215
|
+
#else
|
216
|
+
# define Z_HAS_TRAIT_TypeIsBoolean FALSE
|
217
|
+
# define Z_TRAIT_Type_HAS_is_boolean FALSE
|
218
|
+
#endif
|
219
|
+
|
220
|
+
/*#if Z_LANGUAGE_HAS_TYPE(CPP, WCHAR)
|
221
|
+
# define Z_HAS_TRAIT_TypeIsWChar TRUE
|
222
|
+
# define Z_TRAIT_Type_HAS_is_wchar TRUE
|
223
|
+
#else
|
224
|
+
# define Z_HAS_TRAIT_TypeIsWChar FALSE
|
225
|
+
# define Z_TRAIT_Type_HAS_is_wchar FALSE
|
226
|
+
#endif
|
227
|
+
|
228
|
+
#if Z_LANGUAGE_HAS_TYPE(CPP, CHAR16)
|
229
|
+
# define Z_HAS_TRAIT_TypeIsChar16 TRUE
|
230
|
+
# define Z_TRAIT_Type_HAS_is_char16 TRUE
|
231
|
+
#else
|
232
|
+
# define Z_HAS_TRAIT_TypeIsChar16 FALSE
|
233
|
+
# define Z_TRAIT_Type_HAS_is_char16 FALSE
|
234
|
+
#endif
|
235
|
+
|
236
|
+
#if Z_LANGUAGE_HAS_TYPE(CPP, CHAR32)
|
237
|
+
# define Z_HAS_TRAIT_TypeIsChar32 TRUE
|
238
|
+
# define Z_TRAIT_Type_HAS_is_char32 TRUE
|
239
|
+
#else
|
240
|
+
# define Z_HAS_TRAIT_TypeIsChar32 FALSE
|
241
|
+
# define Z_TRAIT_Type_HAS_is_char32 FALSE
|
242
|
+
#endif*/
|
243
|
+
|
244
|
+
#if Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE) && Z_LANGUAGE_HAS_LITERAL(CPP, NULL_POINTER)
|
245
|
+
# define Z_HAS_TRAIT_TypeIsNullPointer TRUE
|
246
|
+
# define Z_TRAIT_Type_HAS_is_null_pointer TRUE
|
247
|
+
#else
|
248
|
+
# define Z_HAS_TRAIT_TypeIsNullPointer FALSE
|
249
|
+
# define Z_TRAIT_Type_HAS_is_null_pointer FALSE
|
250
|
+
#endif
|
251
|
+
|
252
|
+
//--------------------------------------------------------.
|
253
|
+
// Components that are only available if the language |
|
254
|
+
// features to which they refer are supported or enabled. |
|
255
|
+
//--------------------------------------------------------'
|
256
|
+
|
257
|
+
#if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
258
|
+
# define Z_HAS_TRAIT_TypeIsFunctionRValueReference TRUE
|
259
|
+
# define Z_HAS_TRAIT_TypeIsRValueReference TRUE
|
260
|
+
# define Z_HAS_TRAIT_TypeAddRValueReference TRUE
|
261
|
+
# define Z_HAS_TRAIT_TypeToRValueReference TRUE
|
262
|
+
# define Z_TRAIT_Type_HAS_is_function_rvalue_reference TRUE
|
263
|
+
# define Z_TRAIT_Type_HAS_is_rvalue_reference TRUE
|
264
|
+
# define Z_TRAIT_Type_HAS_add_rvalue_reference TRUE
|
265
|
+
# define Z_TRAIT_Type_HAS_to_rvalue_reference TRUE
|
266
|
+
#else
|
267
|
+
# define Z_HAS_TRAIT_TypeIsFunctionRValueReference FALSE
|
268
|
+
# define Z_HAS_TRAIT_TypeIsRValueReference FALSE
|
269
|
+
# define Z_HAS_TRAIT_TypeAddRValueReference FALSE
|
270
|
+
# define Z_HAS_TRAIT_TypeToRValueReference FALSE
|
271
|
+
# define Z_TRAIT_Type_HAS_is_function_rvalue_reference FALSE
|
272
|
+
# define Z_TRAIT_Type_HAS_is_rvalue_reference FALSE
|
273
|
+
# define Z_TRAIT_Type_HAS_add_rvalue_reference FALSE
|
274
|
+
# define Z_TRAIT_Type_HAS_to_rvalue_reference FALSE
|
275
|
+
#endif
|
276
|
+
|
277
|
+
#if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
278
|
+
# define Z_HAS_TRAIT_TypeIsConstLValue TRUE
|
279
|
+
# define Z_HAS_TRAIT_TypeIsConstRValue TRUE
|
280
|
+
# define Z_HAS_TRAIT_TypeIsConstVolatileLValue TRUE
|
281
|
+
# define Z_HAS_TRAIT_TypeIsConstVolatileRValue TRUE
|
282
|
+
# define Z_HAS_TRAIT_TypeIsLValue TRUE
|
283
|
+
# define Z_HAS_TRAIT_TypeIsRValue TRUE
|
284
|
+
# define Z_HAS_TRAIT_TypeIsVolatileLValue TRUE
|
285
|
+
# define Z_HAS_TRAIT_TypeIsVolatileRValue TRUE
|
286
|
+
# define Z_HAS_TRAIT_TypeAddConstLValue TRUE
|
287
|
+
# define Z_HAS_TRAIT_TypeAddConstRValue TRUE
|
288
|
+
# define Z_HAS_TRAIT_TypeAddConstVolatileLValue TRUE
|
289
|
+
# define Z_HAS_TRAIT_TypeAddConstVolatileRValue TRUE
|
290
|
+
# define Z_HAS_TRAIT_TypeAddLValue TRUE
|
291
|
+
# define Z_HAS_TRAIT_TypeAddRValue TRUE
|
292
|
+
# define Z_HAS_TRAIT_TypeAddVolatileLValue TRUE
|
293
|
+
# define Z_HAS_TRAIT_TypeAddVolatileRValue TRUE
|
294
|
+
# define Z_HAS_TRAIT_TypeRemoveConstThis TRUE
|
295
|
+
# define Z_HAS_TRAIT_TypeRemoveConstVolatileThis TRUE
|
296
|
+
# define Z_HAS_TRAIT_TypeRemoveThis TRUE
|
297
|
+
# define Z_HAS_TRAIT_TypeRemoveVolatileThis TRUE
|
298
|
+
# define Z_HAS_TRAIT_TypeToConstLValue TRUE
|
299
|
+
# define Z_HAS_TRAIT_TypeToConstRValue TRUE
|
300
|
+
# define Z_HAS_TRAIT_TypeToConstVolatileLValue TRUE
|
301
|
+
# define Z_HAS_TRAIT_TypeToConstVolatileRValue TRUE
|
302
|
+
# define Z_HAS_TRAIT_TypeToLValue TRUE
|
303
|
+
# define Z_HAS_TRAIT_TypeToRValue TRUE
|
304
|
+
# define Z_HAS_TRAIT_TypeToVolatileLValue TRUE
|
305
|
+
# define Z_HAS_TRAIT_TypeToVolatileRValue TRUE
|
306
|
+
# define Z_TRAIT_Type_HAS_is_const_lvalue TRUE
|
307
|
+
# define Z_TRAIT_Type_HAS_is_const_rvalue TRUE
|
308
|
+
# define Z_TRAIT_Type_HAS_is_const_volatile_lvalue TRUE
|
309
|
+
# define Z_TRAIT_Type_HAS_is_const_volatile_rvalue TRUE
|
310
|
+
# define Z_TRAIT_Type_HAS_is_lvalue TRUE
|
311
|
+
# define Z_TRAIT_Type_HAS_is_rvalue TRUE
|
312
|
+
# define Z_TRAIT_Type_HAS_is_volatile_lvalue TRUE
|
313
|
+
# define Z_TRAIT_Type_HAS_is_volatile_rvalue TRUE
|
314
|
+
# define Z_TRAIT_Type_HAS_add_const_lvalue TRUE
|
315
|
+
# define Z_TRAIT_Type_HAS_add_const_rvalue TRUE
|
316
|
+
# define Z_TRAIT_Type_HAS_add_const_volatile_lvalue TRUE
|
317
|
+
# define Z_TRAIT_Type_HAS_add_const_volatile_rvalue TRUE
|
318
|
+
# define Z_TRAIT_Type_HAS_add_lvalue TRUE
|
319
|
+
# define Z_TRAIT_Type_HAS_add_rvalue TRUE
|
320
|
+
# define Z_TRAIT_Type_HAS_add_volatile_lvalue TRUE
|
321
|
+
# define Z_TRAIT_Type_HAS_add_volatile_rvalue TRUE
|
322
|
+
# define Z_TRAIT_Type_HAS_remove_const_this TRUE
|
323
|
+
# define Z_TRAIT_Type_HAS_remove_const_volatile_this TRUE
|
324
|
+
# define Z_TRAIT_Type_HAS_remove_this TRUE
|
325
|
+
# define Z_TRAIT_Type_HAS_remove_volatile_this TRUE
|
326
|
+
# define Z_TRAIT_Type_HAS_to_const_lvalue TRUE
|
327
|
+
# define Z_TRAIT_Type_HAS_to_const_rvalue TRUE
|
328
|
+
# define Z_TRAIT_Type_HAS_to_const_volatile_lvalue TRUE
|
329
|
+
# define Z_TRAIT_Type_HAS_to_const_volatile_rvalue TRUE
|
330
|
+
# define Z_TRAIT_Type_HAS_to_lvalue TRUE
|
331
|
+
# define Z_TRAIT_Type_HAS_to_rvalue TRUE
|
332
|
+
# define Z_TRAIT_Type_HAS_to_volatile_lvalue TRUE
|
333
|
+
# define Z_TRAIT_Type_HAS_to_volatile_rvalue TRUE
|
334
|
+
#else
|
335
|
+
# define Z_HAS_TRAIT_TypeIsConstLValue FALSE
|
336
|
+
# define Z_HAS_TRAIT_TypeIsConstRValue FALSE
|
337
|
+
# define Z_HAS_TRAIT_TypeIsConstVolatileLValue FALSE
|
338
|
+
# define Z_HAS_TRAIT_TypeIsConstVolatileRValue FALSE
|
339
|
+
# define Z_HAS_TRAIT_TypeIsLValue FALSE
|
340
|
+
# define Z_HAS_TRAIT_TypeIsRValue FALSE
|
341
|
+
# define Z_HAS_TRAIT_TypeIsVolatileLValue FALSE
|
342
|
+
# define Z_HAS_TRAIT_TypeIsVolatileRValue FALSE
|
343
|
+
# define Z_HAS_TRAIT_TypeAddConstLValue FALSE
|
344
|
+
# define Z_HAS_TRAIT_TypeAddConstRValue FALSE
|
345
|
+
# define Z_HAS_TRAIT_TypeAddConstVolatileLValue FALSE
|
346
|
+
# define Z_HAS_TRAIT_TypeAddConstVolatileRValue FALSE
|
347
|
+
# define Z_HAS_TRAIT_TypeAddLValue FALSE
|
348
|
+
# define Z_HAS_TRAIT_TypeAddRValue FALSE
|
349
|
+
# define Z_HAS_TRAIT_TypeAddVolatileLValue FALSE
|
350
|
+
# define Z_HAS_TRAIT_TypeAddVolatileRValue FALSE
|
351
|
+
# define Z_HAS_TRAIT_TypeRemoveConstThis FALSE
|
352
|
+
# define Z_HAS_TRAIT_TypeRemoveConstVolatileThis FALSE
|
353
|
+
# define Z_HAS_TRAIT_TypeRemoveThis FALSE
|
354
|
+
# define Z_HAS_TRAIT_TypeRemoveVolatileThis FALSE
|
355
|
+
# define Z_HAS_TRAIT_TypeToConstLValue FALSE
|
356
|
+
# define Z_HAS_TRAIT_TypeToConstRValue FALSE
|
357
|
+
# define Z_HAS_TRAIT_TypeToConstVolatileLValue FALSE
|
358
|
+
# define Z_HAS_TRAIT_TypeToConstVolatileRValue FALSE
|
359
|
+
# define Z_HAS_TRAIT_TypeToLValue FALSE
|
360
|
+
# define Z_HAS_TRAIT_TypeToRValue FALSE
|
361
|
+
# define Z_HAS_TRAIT_TypeToVolatileLValue FALSE
|
362
|
+
# define Z_HAS_TRAIT_TypeToVolatileRValue FALSE
|
363
|
+
# define Z_TRAIT_Type_HAS_is_const_lvalue FALSE
|
364
|
+
# define Z_TRAIT_Type_HAS_is_const_rvalue FALSE
|
365
|
+
# define Z_TRAIT_Type_HAS_is_const_volatile_lvalue FALSE
|
366
|
+
# define Z_TRAIT_Type_HAS_is_const_volatile_rvalue FALSE
|
367
|
+
# define Z_TRAIT_Type_HAS_is_lvalue FALSE
|
368
|
+
# define Z_TRAIT_Type_HAS_is_rvalue FALSE
|
369
|
+
# define Z_TRAIT_Type_HAS_is_volatile_lvalue FALSE
|
370
|
+
# define Z_TRAIT_Type_HAS_is_volatile_rvalue FALSE
|
371
|
+
# define Z_TRAIT_Type_HAS_add_const_lvalue FALSE
|
372
|
+
# define Z_TRAIT_Type_HAS_add_const_rvalue FALSE
|
373
|
+
# define Z_TRAIT_Type_HAS_add_const_volatile_lvalue FALSE
|
374
|
+
# define Z_TRAIT_Type_HAS_add_const_volatile_rvalue FALSE
|
375
|
+
# define Z_TRAIT_Type_HAS_add_lvalue FALSE
|
376
|
+
# define Z_TRAIT_Type_HAS_add_rvalue FALSE
|
377
|
+
# define Z_TRAIT_Type_HAS_add_volatile_lvalue FALSE
|
378
|
+
# define Z_TRAIT_Type_HAS_add_volatile_rvalue FALSE
|
379
|
+
# define Z_TRAIT_Type_HAS_remove_const_this FALSE
|
380
|
+
# define Z_TRAIT_Type_HAS_remove_const_volatile_this FALSE
|
381
|
+
# define Z_TRAIT_Type_HAS_remove_this FALSE
|
382
|
+
# define Z_TRAIT_Type_HAS_remove_volatile_this FALSE
|
383
|
+
# define Z_TRAIT_Type_HAS_to_const_lvalue FALSE
|
384
|
+
# define Z_TRAIT_Type_HAS_to_const_rvalue FALSE
|
385
|
+
# define Z_TRAIT_Type_HAS_to_const_volatile_lvalue FALSE
|
386
|
+
# define Z_TRAIT_Type_HAS_to_const_volatile_rvalue FALSE
|
387
|
+
# define Z_TRAIT_Type_HAS_to_lvalue FALSE
|
388
|
+
# define Z_TRAIT_Type_HAS_to_rvalue FALSE
|
389
|
+
# define Z_TRAIT_Type_HAS_to_volatile_lvalue FALSE
|
390
|
+
# define Z_TRAIT_Type_HAS_to_volatile_rvalue FALSE
|
391
|
+
#endif
|
392
|
+
|
393
|
+
//------------------------------------------------.
|
394
|
+
// Components that need compiler built-in traits. |
|
395
|
+
// There are no known workarounds. |
|
396
|
+
//------------------------------------------------'
|
397
|
+
|
398
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_HAS_VIRTUAL_DESTRUCTOR)
|
399
|
+
# define Z_HAS_TRAIT_TypeHasVirtualDestructor TRUE
|
400
|
+
# define Z_TRAIT_Type_HAS_has_virtual_destructor TRUE
|
401
|
+
#else
|
402
|
+
# define Z_HAS_TRAIT_TypeHasVirtualDestructor FALSE
|
403
|
+
# define Z_TRAIT_Type_HAS_has_virtual_destructor FALSE
|
404
|
+
#endif
|
405
|
+
|
406
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_ABSTRACT)
|
407
|
+
# define Z_HAS_TRAIT_TypeIsAbstract TRUE
|
408
|
+
# define Z_TRAIT_Type_HAS_is_abstract TRUE
|
409
|
+
#else
|
410
|
+
# define Z_HAS_TRAIT_TypeIsAbstract FALSE
|
411
|
+
# define Z_TRAIT_Type_HAS_is_abstract FALSE
|
412
|
+
#endif
|
413
|
+
|
414
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_AGGREGATE)
|
415
|
+
# define Z_HAS_TRAIT_TypeIsAggregate TRUE
|
416
|
+
# define Z_TRAIT_Type_HAS_is_aggregate TRUE
|
417
|
+
#else
|
418
|
+
# define Z_HAS_TRAIT_TypeIsAggregate FALSE
|
419
|
+
# define Z_TRAIT_Type_HAS_is_aggregate FALSE
|
420
|
+
#endif
|
421
|
+
|
422
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_ASSIGNABLE)
|
423
|
+
# define Z_HAS_TRAIT_TypeIsAssignable TRUE
|
424
|
+
#else
|
425
|
+
# define Z_HAS_TRAIT_TypeIsAssignable FALSE
|
426
|
+
#endif
|
427
|
+
|
428
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_BASE)
|
429
|
+
# define Z_HAS_TRAIT_TypeIsBase TRUE
|
430
|
+
#else
|
431
|
+
# define Z_HAS_TRAIT_TypeIsBase FALSE
|
432
|
+
#endif
|
433
|
+
|
434
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_CONVERTIBLE)
|
435
|
+
# define Z_HAS_TRAIT_TypeIsConvertible TRUE
|
436
|
+
#else
|
437
|
+
# define Z_HAS_TRAIT_TypeIsConvertible FALSE
|
438
|
+
#endif
|
439
|
+
|
440
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_FINAL)
|
441
|
+
# define Z_HAS_TRAIT_TypeIsFinal TRUE
|
442
|
+
# define Z_TRAIT_Type_HAS_is_final TRUE
|
443
|
+
#else
|
444
|
+
# define Z_HAS_TRAIT_TypeIsFinal FALSE
|
445
|
+
# define Z_TRAIT_Type_HAS_is_final FALSE
|
446
|
+
#endif
|
447
|
+
|
448
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_INTERFACE_CLASS)
|
449
|
+
# define Z_HAS_TRAIT_TypeIsInterfaceClass TRUE
|
450
|
+
# define Z_TRAIT_Type_HAS_is_interface_class TRUE
|
451
|
+
#else
|
452
|
+
# define Z_HAS_TRAIT_TypeIsInterfaceClass FALSE
|
453
|
+
# define Z_TRAIT_Type_HAS_is_interface_class FALSE
|
454
|
+
#endif
|
455
|
+
|
456
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_LITERAL)
|
457
|
+
# define Z_HAS_TRAIT_TypeIsLiteral TRUE
|
458
|
+
# define Z_TRAIT_Type_HAS_is_literal TRUE
|
459
|
+
#else
|
460
|
+
# define Z_HAS_TRAIT_TypeIsLiteral FALSE
|
461
|
+
# define Z_TRAIT_Type_HAS_is_literal FALSE
|
462
|
+
#endif
|
463
|
+
|
464
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_NOTHROW_ASSIGNABLE)
|
465
|
+
# define Z_HAS_TRAIT_TypeIsNothrowAssignable TRUE
|
466
|
+
#else
|
467
|
+
# define Z_HAS_TRAIT_TypeIsNothrowAssignable FALSE
|
468
|
+
#endif
|
469
|
+
|
470
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_POD)
|
471
|
+
# define Z_HAS_TRAIT_TypeIsPOD TRUE
|
472
|
+
# define Z_TRAIT_Type_HAS_is_pod TRUE
|
473
|
+
#else
|
474
|
+
# define Z_HAS_TRAIT_TypeIsPOD FALSE
|
475
|
+
# define Z_TRAIT_Type_HAS_is_pod FALSE
|
476
|
+
#endif
|
477
|
+
|
478
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_POLYMORPHIC)
|
479
|
+
# define Z_HAS_TRAIT_TypeIsPolymorphic TRUE
|
480
|
+
# define Z_TRAIT_Type_HAS_is_polymorphic TRUE
|
481
|
+
#else
|
482
|
+
# define Z_HAS_TRAIT_TypeIsPolymorphic FALSE
|
483
|
+
# define Z_TRAIT_Type_HAS_is_polymorphic FALSE
|
484
|
+
#endif
|
485
|
+
|
486
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_ASSIGNABLE)
|
487
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyAssignable TRUE
|
488
|
+
#else
|
489
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyAssignable FALSE
|
490
|
+
#endif
|
491
|
+
|
492
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_COPY_ASSIGNABLE)
|
493
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyCopyAssignable TRUE
|
494
|
+
# define Z_TRAIT_Type_HAS_is_trivially_copy_assignable TRUE
|
495
|
+
#else
|
496
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyCopyAssignable FALSE
|
497
|
+
# define Z_TRAIT_Type_HAS_is_trivially_copy_assignable FALSE
|
498
|
+
#endif
|
499
|
+
|
500
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE)
|
501
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyCopyConstructible TRUE
|
502
|
+
# define Z_TRAIT_Type_HAS_is_trivially_copy_constructible TRUE
|
503
|
+
#else
|
504
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyCopyConstructible FALSE
|
505
|
+
# define Z_TRAIT_Type_HAS_is_trivially_copy_constructible FALSE
|
506
|
+
#endif
|
507
|
+
|
508
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_COPYABLE)
|
509
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyCopyable TRUE
|
510
|
+
# define Z_TRAIT_Type_HAS_is_trivially_copyable TRUE
|
511
|
+
#else
|
512
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyCopyable FALSE
|
513
|
+
# define Z_TRAIT_Type_HAS_is_trivially_copyable FALSE
|
514
|
+
#endif
|
515
|
+
|
516
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE)
|
517
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyDefaultConstructible TRUE
|
518
|
+
# define Z_TRAIT_Type_HAS_is_trivially_default_constructible TRUE
|
519
|
+
#else
|
520
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyDefaultConstructible FALSE
|
521
|
+
# define Z_TRAIT_Type_HAS_is_trivially_default_constructible FALSE
|
522
|
+
#endif
|
523
|
+
|
524
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_DESTRUCTIBLE)
|
525
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyDestructible TRUE
|
526
|
+
# define Z_TRAIT_Type_HAS_is_trivially_destructible TRUE
|
527
|
+
#else
|
528
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyDestructible FALSE
|
529
|
+
# define Z_TRAIT_Type_HAS_is_trivially_destructible FALSE
|
530
|
+
#endif
|
531
|
+
|
532
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_UNION)
|
533
|
+
# define Z_HAS_TRAIT_TypeIsUnion TRUE
|
534
|
+
# define Z_TRAIT_Type_HAS_is_union TRUE
|
535
|
+
#else
|
536
|
+
# define Z_HAS_TRAIT_TypeIsUnion FALSE
|
537
|
+
# define Z_TRAIT_Type_HAS_is_union FALSE
|
538
|
+
#endif
|
539
|
+
|
540
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_UNDERLYING_TYPE)
|
541
|
+
# define Z_HAS_TRAIT_TypeUnderlyingType TRUE
|
542
|
+
# define Z_TRAIT_Type_HAS_underlying_type TRUE
|
543
|
+
#else
|
544
|
+
# define Z_HAS_TRAIT_TypeUnderlyingType FALSE
|
545
|
+
# define Z_TRAIT_Type_HAS_underlying_type FALSE
|
546
|
+
#endif
|
547
|
+
|
548
|
+
//-----------------------------------------------------------.
|
549
|
+
// Components that need compiler built-in traits in addition |
|
550
|
+
// to some C++11 features. There are no known workarounds. |
|
551
|
+
//-----------------------------------------------------------'
|
552
|
+
|
553
|
+
#if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE) && Z_COMPILER_HAS_TRAIT(TYPE_IS_CONSTRUCTIBLE)
|
554
|
+
# define Z_HAS_TRAIT_TypeIsConstructible TRUE
|
555
|
+
#else
|
556
|
+
# define Z_HAS_TRAIT_TypeIsConstructible FALSE
|
557
|
+
#endif
|
558
|
+
|
559
|
+
#if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE) && Z_COMPILER_HAS_TRAIT(TYPE_IS_NOTHROW_CONSTRUCTIBLE)
|
560
|
+
# define Z_HAS_TRAIT_TypeIsNothrowConstructible TRUE
|
561
|
+
#else
|
562
|
+
# define Z_HAS_TRAIT_TypeIsNothrowConstructible FALSE
|
563
|
+
#endif
|
564
|
+
|
565
|
+
#if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE) && Z_COMPILER_HAS_TRAIT(TYPE_IS_TRIVIALLY_CONSTRUCTIBLE)
|
566
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyConstructible TRUE
|
567
|
+
#else
|
568
|
+
# define Z_HAS_TRAIT_TypeIsTriviallyConstructible FALSE
|
569
|
+
#endif
|
570
|
+
|
571
|
+
//-------------------------------------------------------------.
|
572
|
+
// Components that use built-in compiler traits if available. |
|
573
|
+
// If not, they use workarounds that need some C++11 features. |
|
574
|
+
//-------------------------------------------------------------'
|
575
|
+
|
576
|
+
#if Z_COMPILER_HAS_TRAIT(TYPE_IS_ENUMERATION) || Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
577
|
+
# define Z_HAS_TRAIT_TypeIsEnumeration TRUE
|
578
|
+
# define Z_TRAIT_Type_HAS_is_enumeration TRUE
|
579
|
+
#else
|
580
|
+
# define Z_HAS_TRAIT_TypeIsEnumeration FALSE
|
581
|
+
# define Z_TRAIT_Type_HAS_is_enumeration FALSE
|
582
|
+
#endif
|
583
|
+
|
584
|
+
//-------------------------------------------.
|
585
|
+
// Components that need some C++11 features. |
|
586
|
+
//-------------------------------------------'
|
587
|
+
|
588
|
+
#if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
589
|
+
# define Z_HAS_TRAIT_TypeIsComplete TRUE
|
590
|
+
# define Z_HAS_TRAIT_TypeIsIncomplete TRUE
|
591
|
+
#else
|
592
|
+
# define Z_HAS_TRAIT_TypeIsComplete FALSE
|
593
|
+
# define Z_HAS_TRAIT_TypeIsIncomplete FALSE
|
594
|
+
#endif
|
595
|
+
|
596
|
+
#if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE) && Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE)
|
597
|
+
# define Z_HAS_TRAIT_TypeIsDefaultConstructible TRUE
|
598
|
+
# define Z_TRAIT_Type_HAS_is_default_constructible TRUE
|
599
|
+
#else
|
600
|
+
# define Z_HAS_TRAIT_TypeIsDefaultConstructible FALSE
|
601
|
+
# define Z_TRAIT_Type_HAS_is_default_constructible FALSE
|
602
|
+
#endif
|
603
|
+
|
604
|
+
#if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE) && Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE)
|
605
|
+
# define Z_HAS_TRAIT_TypeIsFunctional TRUE
|
606
|
+
# define Z_HAS_TRAIT_TypeIsFunctor TRUE
|
607
|
+
#else
|
608
|
+
# define Z_HAS_TRAIT_TypeIsFunctional FALSE
|
609
|
+
# define Z_HAS_TRAIT_TypeIsFunctor TRUE
|
610
|
+
#endif
|
611
|
+
|
612
|
+
#if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE_EXTENDED_PARAMETERS)
|
613
|
+
# define Z_HAS_TRAIT_TypeIsTemplate TRUE
|
614
|
+
# define Z_TRAIT_Type_HAS_is_template TRUE
|
615
|
+
#else
|
616
|
+
# define Z_HAS_TRAIT_TypeIsTemplate FALSE
|
617
|
+
# define Z_TRAIT_Type_HAS_is_template FALSE
|
618
|
+
#endif
|
619
|
+
|
620
|
+
#if Z_HAS_TRAIT(TypeList)
|
621
|
+
# define Z_HAS_TRAIT_TypeParameters TRUE
|
622
|
+
# define Z_TRAIT_Type_HAS_parameters TRUE
|
623
|
+
#else
|
624
|
+
# define Z_HAS_TRAIT_TypeParameters FALSE
|
625
|
+
# define Z_TRAIT_Type_HAS_parameters FALSE
|
626
|
+
#endif
|
627
|
+
|
628
|
+
//-------------------------------------------------------------------------.
|
629
|
+
// Components that need some C++14 features in addition to compiler magic. |
|
630
|
+
//-------------------------------------------------------------------------'
|
631
|
+
|
632
|
+
#if Z_COMPILER_HAS_MAGIC_CONSTANT(MANGLED_FUNCTION_NAME) && \
|
633
|
+
Z_LANGUAGE_HAS(CPP, CPP14_RULES_ON_CONSTANT_EXPRESSION_FUNCTION)
|
634
|
+
|
635
|
+
# define Z_TRAIT_Type_HAS_string TRUE
|
636
|
+
# define Z_TRAIT_Type_HAS_symbol TRUE
|
637
|
+
# define Z_TRAIT_Type_HAS_type_string_size TRUE
|
638
|
+
#else
|
639
|
+
# define Z_TRAIT_Type_HAS_string FALSE
|
640
|
+
# define Z_TRAIT_Type_HAS_symbol FALSE
|
641
|
+
# define Z_TRAIT_Type_HAS_type_string_size FALSE
|
642
|
+
#endif
|
643
|
+
|
644
|
+
//------------------------------------------------------.
|
645
|
+
// Components that are only available in Objective-C++. |
|
646
|
+
//------------------------------------------------------'
|
647
|
+
|
648
|
+
#if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
649
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCClass TRUE
|
650
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCClassPointer TRUE
|
651
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCObject TRUE
|
652
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCObjectPointer TRUE
|
653
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_class TRUE
|
654
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_class_pointer TRUE
|
655
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_object TRUE
|
656
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_object_pointer TRUE
|
657
|
+
#else
|
658
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCClass FALSE
|
659
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCClassPointer FALSE
|
660
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCObject FALSE
|
661
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCObjectPointer FALSE
|
662
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_class FALSE
|
663
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_class_pointer FALSE
|
664
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_object FALSE
|
665
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_object_pointer FALSE
|
666
|
+
#endif
|
667
|
+
|
668
|
+
//-----------------------------------------------------.
|
669
|
+
// Components that are only available in Objective-C++ |
|
670
|
+
// and that need some C++11 features. |
|
671
|
+
//-----------------------------------------------------'
|
672
|
+
|
673
|
+
#if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP) && Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
674
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCInstance TRUE
|
675
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCInstancePointer TRUE
|
676
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_instance TRUE
|
677
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_instance_pointer TRUE
|
678
|
+
#else
|
679
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCInstance FALSE
|
680
|
+
# define Z_HAS_TRAIT_TypeIsObjectiveCInstancePointer FALSE
|
681
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_instance FALSE
|
682
|
+
# define Z_TRAIT_Type_HAS_is_objective_c_instance_pointer FALSE
|
683
|
+
#endif
|
684
|
+
|
685
|
+
//-------------------------------------------------------------------.
|
686
|
+
// Aliases that are only available if the language supports template |
|
687
|
+
// aliases and the component to which they refer is also available. |
|
688
|
+
//-------------------------------------------------------------------'
|
689
|
+
|
690
|
+
#if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS)
|
691
|
+
# define Z_TRAIT_Type_HAS_to_member_pointer TRUE
|
692
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const TRUE
|
693
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_volatile TRUE
|
694
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_lvalue_reference TRUE
|
695
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_pointer TRUE
|
696
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_volatile TRUE
|
697
|
+
# define Z_HAS_TRAIT_ALIAS_type_class_type TRUE
|
698
|
+
# define Z_HAS_TRAIT_ALIAS_type_element_type TRUE
|
699
|
+
# define Z_HAS_TRAIT_ALIAS_type_pointee_type TRUE
|
700
|
+
# define Z_HAS_TRAIT_ALIAS_type_referencee_type TRUE
|
701
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const TRUE
|
702
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const_volatile TRUE
|
703
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_pointer TRUE
|
704
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_reference TRUE
|
705
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_volatile TRUE
|
706
|
+
# define Z_HAS_TRAIT_ALIAS_type_return_type TRUE
|
707
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const TRUE
|
708
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_volatile TRUE
|
709
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_forwardable TRUE
|
710
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_function TRUE
|
711
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_lvalue_reference TRUE
|
712
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_member_pointer TRUE
|
713
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_opaque TRUE
|
714
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_pointer TRUE
|
715
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_signed TRUE
|
716
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_unqualified TRUE
|
717
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_unsigned TRUE
|
718
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_volatile TRUE
|
719
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_wrap TRUE
|
720
|
+
#else
|
721
|
+
# define Z_TRAIT_Type_HAS_to_member_pointer FALSE
|
722
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const FALSE
|
723
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_volatile FALSE
|
724
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_lvalue_reference FALSE
|
725
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_pointer FALSE
|
726
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_volatile FALSE
|
727
|
+
# define Z_HAS_TRAIT_ALIAS_type_class_type FALSE
|
728
|
+
# define Z_HAS_TRAIT_ALIAS_type_element_type FALSE
|
729
|
+
# define Z_HAS_TRAIT_ALIAS_type_pointee_type FALSE
|
730
|
+
# define Z_HAS_TRAIT_ALIAS_type_referencee_type FALSE
|
731
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const FALSE
|
732
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const_volatile FALSE
|
733
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_pointer FALSE
|
734
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_reference FALSE
|
735
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_volatile FALSE
|
736
|
+
# define Z_HAS_TRAIT_ALIAS_type_return_type FALSE
|
737
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const FALSE
|
738
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_volatile FALSE
|
739
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_forwardable FALSE
|
740
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_function FALSE
|
741
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_lvalue_reference FALSE
|
742
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_member_pointer FALSE
|
743
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_opaque FALSE
|
744
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_pointer FALSE
|
745
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_signed FALSE
|
746
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_unqualified FALSE
|
747
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_unsigned FALSE
|
748
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_volatile FALSE
|
749
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_wrap FALSE
|
750
|
+
#endif
|
751
|
+
|
752
|
+
#if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS) && \
|
753
|
+
Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
754
|
+
|
755
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_lvalue TRUE
|
756
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_rvalue TRUE
|
757
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_volatile_lvalue TRUE
|
758
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_volatile_rvalue TRUE
|
759
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_lvalue TRUE
|
760
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_rvalue TRUE
|
761
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_volatile_lvalue TRUE
|
762
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_volatile_rvalue TRUE
|
763
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const_this TRUE
|
764
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const_volatile_this TRUE
|
765
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_this TRUE
|
766
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_volatile_this TRUE
|
767
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_lvalue TRUE
|
768
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_rvalue TRUE
|
769
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_volatile_lvalue TRUE
|
770
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_volatile_rvalue TRUE
|
771
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_lvalue TRUE
|
772
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_rvalue TRUE
|
773
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_volatile_lvalue TRUE
|
774
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_volatile_rvalue TRUE
|
775
|
+
#else
|
776
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_lvalue TRUE
|
777
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_rvalue TRUE
|
778
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_volatile_lvalue TRUE
|
779
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_const_volatile_rvalue TRUE
|
780
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_lvalue TRUE
|
781
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_rvalue TRUE
|
782
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_volatile_lvalue TRUE
|
783
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_volatile_rvalue TRUE
|
784
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const_this TRUE
|
785
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_const_volatile_this TRUE
|
786
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_this TRUE
|
787
|
+
# define Z_HAS_TRAIT_ALIAS_type_remove_volatile_this TRUE
|
788
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_lvalue TRUE
|
789
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_rvalue TRUE
|
790
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_volatile_lvalue TRUE
|
791
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_const_volatile_rvalue TRUE
|
792
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_lvalue TRUE
|
793
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_rvalue TRUE
|
794
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_volatile_lvalue TRUE
|
795
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_volatile_rvalue TRUE
|
796
|
+
#endif
|
797
|
+
|
798
|
+
#if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS) && Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
799
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_rvalue_reference TRUE
|
800
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_rvalue_reference TRUE
|
801
|
+
#else
|
802
|
+
# define Z_HAS_TRAIT_ALIAS_type_add_rvalue_reference FALSE
|
803
|
+
# define Z_HAS_TRAIT_ALIAS_type_to_rvalue_reference FALSE
|
804
|
+
#endif
|
805
|
+
|
806
|
+
#if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS) && Z_TRAIT_HAS(Type, parameters)
|
807
|
+
# define Z_HAS_TRAIT_ALIAS_type_parameters TRUE
|
808
|
+
#else
|
809
|
+
# define Z_HAS_TRAIT_ALIAS_type_parameters FALSE
|
810
|
+
#endif
|
811
|
+
|
812
|
+
#if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS) && Z_TRAIT_HAS(Type, underlying_type)
|
813
|
+
# define Z_HAS_TRAIT_ALIAS_type_underlying_type TRUE
|
814
|
+
#else
|
815
|
+
# define Z_HAS_TRAIT_ALIAS_type_underlying_type FALSE
|
816
|
+
#endif
|
817
|
+
|
818
|
+
// MARK: - Helpers
|
819
|
+
|
820
|
+
namespace Zeta {namespace Detail {namespace Type {namespace Helpers {
|
821
|
+
|
822
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
823
|
+
|
824
|
+
namespace {
|
825
|
+
template <class T, SInt L, Boolean B> struct IsComplete : False {};
|
826
|
+
template <class T, SInt L> struct IsComplete <T, L, !!sizeof(T)> : True {};
|
827
|
+
template <class T, SInt L, Boolean B> struct IsIncomplete : True {};
|
828
|
+
template <class T, SInt L> struct IsIncomplete<T, L, !!sizeof(T)> : False {};
|
829
|
+
}
|
830
|
+
|
831
|
+
template <class T, Boolean B> struct IsStructureOrUnion : False {};
|
832
|
+
template <class T> struct IsStructureOrUnion<T, !!sizeof(int (T::*))> : True {};
|
833
|
+
|
834
|
+
template <class T, Boolean B> struct IsUsableToCastNumber : False {};
|
835
|
+
template <class T> struct IsUsableToCastNumber<T, !!sizeof((T)1)> : True {};
|
836
|
+
|
837
|
+
# if Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE)
|
838
|
+
|
839
|
+
template <class T, class R> struct IsDefaultConstructible : False {};
|
840
|
+
template <class T> struct IsDefaultConstructible<T, decltype(T())> : True {};
|
841
|
+
|
842
|
+
template <class T> Z_INLINE T fake();
|
843
|
+
|
844
|
+
template <class T, class F, class R> struct IsFunctional : False {};
|
845
|
+
template <class T, class F, class R> struct IsFunctor : False {};
|
846
|
+
|
847
|
+
#if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
848
|
+
|
849
|
+
template <class T, class R, class... P> struct IsFunctional<T, R(P...), decltype(fake<T>() (fake<P>()...))> : True {};
|
850
|
+
template <class T, class R, class... P> struct IsFunctor <T, R(P...), decltype(fake<T>().operator()(fake<P>()...))> : True {};
|
851
|
+
|
852
|
+
# else
|
853
|
+
|
854
|
+
template <class T, class R> struct IsFunctional<T, R(), decltype(fake<T>() ())> : True {};
|
855
|
+
template <class T, class R> struct IsFunctor <T, R(), decltype(fake<T>().operator()())> : True {};
|
856
|
+
|
857
|
+
# define Z_TEMPLATE_FAKE_ARGUMENT(index) fake<P##index>()
|
858
|
+
|
859
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
860
|
+
\
|
861
|
+
template <class T, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct IsFunctional< \
|
862
|
+
T, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)), \
|
863
|
+
decltype(fake<T>()(Z_FOR_##parameter_count##_CALL_WITH_INDEX(Z_TEMPLATE_FAKE_ARGUMENT, Z_COMMA))) \
|
864
|
+
> : True {}; \
|
865
|
+
\
|
866
|
+
template <class T, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct IsFunctor< \
|
867
|
+
T, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)), \
|
868
|
+
decltype(fake<T>().operator()(Z_FOR_##parameter_count##_CALL_WITH_INDEX(Z_TEMPLATE_FAKE_ARGUMENT, Z_COMMA))) \
|
869
|
+
> : True {};
|
870
|
+
|
871
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
872
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
873
|
+
# undef Z_TEMPLATE_FAKE_ARGUMENT
|
874
|
+
|
875
|
+
# endif
|
876
|
+
|
877
|
+
# endif
|
878
|
+
|
879
|
+
# endif
|
880
|
+
|
881
|
+
template <class T> struct RemovePointer;
|
882
|
+
template <class T> struct RemovePointer<T*> {typedef T type;};
|
883
|
+
}}}}
|
884
|
+
|
885
|
+
// MARK: - Abstract
|
886
|
+
|
887
|
+
namespace Zeta {namespace Detail {namespace Type {namespace Abstract {
|
888
|
+
|
889
|
+
struct Invalid {
|
890
|
+
enum { is_arithmetic = false,
|
891
|
+
is_array = false,
|
892
|
+
is_callable = false,
|
893
|
+
is_char = false,
|
894
|
+
is_class = false,
|
895
|
+
is_const = false,
|
896
|
+
is_const_volatile = false,
|
897
|
+
is_data_member_pointer = false,
|
898
|
+
is_empty = false,
|
899
|
+
is_exact = false,
|
900
|
+
is_integer = false,
|
901
|
+
is_integral = false,
|
902
|
+
is_flexible_array = false,
|
903
|
+
is_function = false,
|
904
|
+
is_function_lvalue_reference = false,
|
905
|
+
is_function_pointer = false,
|
906
|
+
is_function_reference = false,
|
907
|
+
is_fundamental = false,
|
908
|
+
is_lvalue_reference = false,
|
909
|
+
is_member_function_pointer = false,
|
910
|
+
is_member_pointer = false,
|
911
|
+
is_nat = true,
|
912
|
+
is_natural = false,
|
913
|
+
is_number = false,
|
914
|
+
is_pointer = false,
|
915
|
+
is_qualified = false,
|
916
|
+
is_real = false,
|
917
|
+
is_reference = false,
|
918
|
+
is_scalar = false,
|
919
|
+
is_schar = false,
|
920
|
+
is_signed = false,
|
921
|
+
is_signed_or_unsigned = false,
|
922
|
+
is_simple = false,
|
923
|
+
is_sint = false,
|
924
|
+
is_slong = false,
|
925
|
+
is_sshort = false,
|
926
|
+
is_statically_allocatable = false,
|
927
|
+
is_storable = false,
|
928
|
+
is_structure = false,
|
929
|
+
is_structure_or_union = false,
|
930
|
+
is_uchar = false,
|
931
|
+
is_uint = false,
|
932
|
+
is_ulong = false,
|
933
|
+
is_unsigned = false,
|
934
|
+
is_ushort = false,
|
935
|
+
is_valid = false,
|
936
|
+
is_variadic = false,
|
937
|
+
is_variadic_function = false,
|
938
|
+
is_void = false,
|
939
|
+
is_void_pointer = false,
|
940
|
+
is_volatile = false
|
941
|
+
};
|
942
|
+
|
943
|
+
enum { arity = 0,
|
944
|
+
bits = 0,
|
945
|
+
element_count = 0,
|
946
|
+
pointer_level = 0,
|
947
|
+
size = 0
|
948
|
+
};
|
949
|
+
|
950
|
+
typedef NaT type;
|
951
|
+
|
952
|
+
typedef NaT add_const;
|
953
|
+
typedef NaT add_const_volatile;
|
954
|
+
typedef NaT add_lvalue_reference;
|
955
|
+
typedef NaT add_pointer;
|
956
|
+
typedef NaT add_volatile;
|
957
|
+
typedef NaT class_type;
|
958
|
+
typedef NaT element_type;
|
959
|
+
typedef NaT pointee_type;
|
960
|
+
typedef NaT referencee_type;
|
961
|
+
typedef NaT remove_const;
|
962
|
+
typedef NaT remove_const_volatile;
|
963
|
+
typedef NaT remove_pointer;
|
964
|
+
typedef NaT remove_reference;
|
965
|
+
typedef NaT remove_volatile;
|
966
|
+
typedef NaT return_type;
|
967
|
+
typedef NaT to_const;
|
968
|
+
typedef NaT to_const_volatile;
|
969
|
+
typedef NaT to_forwardable;
|
970
|
+
typedef NaT to_function;
|
971
|
+
typedef NaT to_lvalue_reference;
|
972
|
+
typedef NaT to_opaque;
|
973
|
+
typedef NaT to_pointer;
|
974
|
+
typedef NaT to_signed;
|
975
|
+
typedef NaT to_unqualified;
|
976
|
+
typedef NaT to_unsigned;
|
977
|
+
typedef NaT to_volatile;
|
978
|
+
typedef NaT to_wrap;
|
979
|
+
|
980
|
+
# if Z_TRAIT_HAS(Type, has_virtual_destructor)
|
981
|
+
enum {has_virtual_destructor = false};
|
982
|
+
# endif
|
983
|
+
|
984
|
+
# if Z_TRAIT_HAS(Type, is_abstract)
|
985
|
+
enum {is_abstract = false};
|
986
|
+
# endif
|
987
|
+
|
988
|
+
# if Z_TRAIT_HAS(Type, is_aggregate)
|
989
|
+
enum {is_aggregate = false};
|
990
|
+
# endif
|
991
|
+
|
992
|
+
# if Z_TRAIT_HAS(Type, is_boolean)
|
993
|
+
enum {is_boolean = false};
|
994
|
+
# endif
|
995
|
+
|
996
|
+
/*# if Z_TRAIT_HAS(Type, is_char16)
|
997
|
+
enum {is_char16 = false};
|
998
|
+
# endif
|
999
|
+
|
1000
|
+
# if Z_TRAIT_HAS(Type, is_char32)
|
1001
|
+
enum {is_char32 = false};
|
1002
|
+
# endif*/
|
1003
|
+
|
1004
|
+
# if Z_TRAIT_HAS(Type, is_default_constructible)
|
1005
|
+
enum {is_default_constructible = false};
|
1006
|
+
# endif
|
1007
|
+
|
1008
|
+
# if Z_TRAIT_HAS(Type, is_double)
|
1009
|
+
enum {is_double = false};
|
1010
|
+
# endif
|
1011
|
+
|
1012
|
+
# if Z_TRAIT_HAS(Type, is_enumeration)
|
1013
|
+
enum {is_enumeration = false};
|
1014
|
+
# endif
|
1015
|
+
|
1016
|
+
# if Z_TRAIT_HAS(Type, is_final)
|
1017
|
+
enum {is_final = false};
|
1018
|
+
# endif
|
1019
|
+
|
1020
|
+
# if Z_TRAIT_HAS(Type, is_float)
|
1021
|
+
enum {is_float = false};
|
1022
|
+
# endif
|
1023
|
+
|
1024
|
+
# if Z_TRAIT_HAS(Type, is_float16)
|
1025
|
+
enum {is_float16 = false};
|
1026
|
+
# endif
|
1027
|
+
|
1028
|
+
# if Z_TRAIT_HAS(Type, is_float32)
|
1029
|
+
enum {is_float32 = false};
|
1030
|
+
# endif
|
1031
|
+
|
1032
|
+
# if Z_TRAIT_HAS(Type, is_float64)
|
1033
|
+
enum {is_float64 = false};
|
1034
|
+
# endif
|
1035
|
+
|
1036
|
+
# if Z_TRAIT_HAS(Type, is_float128)
|
1037
|
+
enum {is_float128 = false};
|
1038
|
+
# endif
|
1039
|
+
|
1040
|
+
# if Z_TRAIT_HAS(Type, is_float80_x87)
|
1041
|
+
enum {is_float80_x87 = false};
|
1042
|
+
# endif
|
1043
|
+
|
1044
|
+
# if Z_TRAIT_HAS(Type, is_float96_x87)
|
1045
|
+
enum {is_float96_x87 = false};
|
1046
|
+
# endif
|
1047
|
+
|
1048
|
+
# if Z_TRAIT_HAS(Type, is_float128_x87)
|
1049
|
+
enum {is_float128_x87 = false};
|
1050
|
+
# endif
|
1051
|
+
|
1052
|
+
# if Z_TRAIT_HAS(Type, is_interface_class)
|
1053
|
+
enum {is_interface_class = false};
|
1054
|
+
# endif
|
1055
|
+
|
1056
|
+
# if Z_TRAIT_HAS(Type, is_ldouble)
|
1057
|
+
enum {is_ldouble = false};
|
1058
|
+
# endif
|
1059
|
+
|
1060
|
+
# if Z_TRAIT_HAS(Type, is_literal)
|
1061
|
+
enum {is_literal = false};
|
1062
|
+
# endif
|
1063
|
+
|
1064
|
+
# if Z_TRAIT_HAS(Type, is_null_pointer)
|
1065
|
+
enum {is_null_pointer = false};
|
1066
|
+
# endif
|
1067
|
+
|
1068
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
1069
|
+
enum {is_pod = false};
|
1070
|
+
# endif
|
1071
|
+
|
1072
|
+
# if Z_TRAIT_HAS(Type, is_polymorphic)
|
1073
|
+
enum {is_polymorphic = false};
|
1074
|
+
# endif
|
1075
|
+
|
1076
|
+
# if Z_TRAIT_HAS(Type, is_sint8)
|
1077
|
+
enum {is_sint8 = false};
|
1078
|
+
# endif
|
1079
|
+
|
1080
|
+
# if Z_TRAIT_HAS(Type, is_sint16)
|
1081
|
+
enum {is_sint16 = false};
|
1082
|
+
# endif
|
1083
|
+
|
1084
|
+
# if Z_TRAIT_HAS(Type, is_sint32)
|
1085
|
+
enum {is_sint32 = false};
|
1086
|
+
# endif
|
1087
|
+
|
1088
|
+
# if Z_TRAIT_HAS(Type, is_sint64)
|
1089
|
+
enum {is_sint64 = false};
|
1090
|
+
# endif
|
1091
|
+
|
1092
|
+
# if Z_TRAIT_HAS(Type, is_sint128)
|
1093
|
+
enum {is_sint128 = false};
|
1094
|
+
# endif
|
1095
|
+
|
1096
|
+
# if Z_TRAIT_HAS(Type, is_template)
|
1097
|
+
enum {is_template = false};
|
1098
|
+
# endif
|
1099
|
+
|
1100
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_assignable)
|
1101
|
+
enum {is_trivially_copy_assignable = false};
|
1102
|
+
# endif
|
1103
|
+
|
1104
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_constructible)
|
1105
|
+
enum {is_trivially_copy_constructible = false};
|
1106
|
+
# endif
|
1107
|
+
|
1108
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copyable)
|
1109
|
+
enum {is_trivially_copyable = false};
|
1110
|
+
# endif
|
1111
|
+
|
1112
|
+
# if Z_TRAIT_HAS(Type, is_trivially_default_constructible)
|
1113
|
+
enum {is_trivially_default_constructible = false};
|
1114
|
+
# endif
|
1115
|
+
|
1116
|
+
# if Z_TRAIT_HAS(Type, is_trivially_destructible)
|
1117
|
+
enum {is_trivially_destructible = false};
|
1118
|
+
# endif
|
1119
|
+
|
1120
|
+
# if Z_TRAIT_HAS(Type, is_uint8)
|
1121
|
+
enum {is_uint8 = false};
|
1122
|
+
# endif
|
1123
|
+
|
1124
|
+
# if Z_TRAIT_HAS(Type, is_uint16)
|
1125
|
+
enum {is_uint16 = false};
|
1126
|
+
# endif
|
1127
|
+
|
1128
|
+
# if Z_TRAIT_HAS(Type, is_uint32)
|
1129
|
+
enum {is_uint32 = false};
|
1130
|
+
# endif
|
1131
|
+
|
1132
|
+
# if Z_TRAIT_HAS(Type, is_uint64)
|
1133
|
+
enum {is_uint64 = false};
|
1134
|
+
# endif
|
1135
|
+
|
1136
|
+
# if Z_TRAIT_HAS(Type, is_uint128)
|
1137
|
+
enum {is_uint128 = false};
|
1138
|
+
# endif
|
1139
|
+
|
1140
|
+
# if Z_TRAIT_HAS(Type, is_union)
|
1141
|
+
enum {is_union = false};
|
1142
|
+
# endif
|
1143
|
+
|
1144
|
+
/*# if Z_TRAIT_HAS(Type, is_wchar)
|
1145
|
+
enum {is_wchar = false};
|
1146
|
+
# endif*/
|
1147
|
+
|
1148
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
1149
|
+
|
1150
|
+
enum { is_objective_c_class = false,
|
1151
|
+
is_objective_c_class_pointer = false,
|
1152
|
+
is_objective_c_object = false,
|
1153
|
+
is_objective_c_object_pointer = false
|
1154
|
+
};
|
1155
|
+
|
1156
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
1157
|
+
enum { is_objective_c_instance = false,
|
1158
|
+
is_objective_c_instance_pointer = false
|
1159
|
+
};
|
1160
|
+
# endif
|
1161
|
+
|
1162
|
+
# endif
|
1163
|
+
|
1164
|
+
# ifdef Z_LLONG
|
1165
|
+
enum { is_sllong = false,
|
1166
|
+
is_ullong = false
|
1167
|
+
};
|
1168
|
+
# endif
|
1169
|
+
|
1170
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
1171
|
+
|
1172
|
+
enum { is_const_lvalue = false,
|
1173
|
+
is_const_rvalue = false,
|
1174
|
+
is_const_volatile_lvalue = false,
|
1175
|
+
is_const_volatile_rvalue = false,
|
1176
|
+
is_lvalue = false,
|
1177
|
+
is_rvalue = false,
|
1178
|
+
is_volatile_lvalue = false,
|
1179
|
+
is_volatile_rvalue = false
|
1180
|
+
};
|
1181
|
+
|
1182
|
+
typedef NaT add_const_lvalue;
|
1183
|
+
typedef NaT add_const_rvalue;
|
1184
|
+
typedef NaT add_const_volatile_lvalue;
|
1185
|
+
typedef NaT add_const_volatile_rvalue;
|
1186
|
+
typedef NaT add_lvalue;
|
1187
|
+
typedef NaT add_rvalue;
|
1188
|
+
typedef NaT add_volatile_lvalue;
|
1189
|
+
typedef NaT add_volatile_rvalue;
|
1190
|
+
typedef NaT remove_const_this;
|
1191
|
+
typedef NaT remove_const_volatile_this;
|
1192
|
+
typedef NaT remove_this;
|
1193
|
+
typedef NaT remove_volatile_this;
|
1194
|
+
typedef NaT to_const_lvalue;
|
1195
|
+
typedef NaT to_const_rvalue;
|
1196
|
+
typedef NaT to_const_volatile_lvalue;
|
1197
|
+
typedef NaT to_const_volatile_rvalue;
|
1198
|
+
typedef NaT to_lvalue;
|
1199
|
+
typedef NaT to_rvalue;
|
1200
|
+
typedef NaT to_volatile_lvalue;
|
1201
|
+
typedef NaT to_volatile_rvalue;
|
1202
|
+
|
1203
|
+
# endif
|
1204
|
+
|
1205
|
+
# if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
1206
|
+
|
1207
|
+
enum { is_function_rvalue_reference = false,
|
1208
|
+
is_rvalue_reference = false
|
1209
|
+
};
|
1210
|
+
|
1211
|
+
typedef NaT add_rvalue_reference;
|
1212
|
+
typedef NaT to_rvalue_reference;
|
1213
|
+
|
1214
|
+
# endif
|
1215
|
+
|
1216
|
+
# if Z_TRAIT_HAS(Type, parameters)
|
1217
|
+
typedef NaT parameters;
|
1218
|
+
# endif
|
1219
|
+
|
1220
|
+
# if Z_TRAIT_HAS(Type, underlying_type)
|
1221
|
+
typedef NaT underlying_type;
|
1222
|
+
# endif
|
1223
|
+
};
|
1224
|
+
|
1225
|
+
struct Valid : Invalid {
|
1226
|
+
enum { is_nat = false,
|
1227
|
+
is_valid = true
|
1228
|
+
};
|
1229
|
+
};
|
1230
|
+
|
1231
|
+
struct Storable : Valid {
|
1232
|
+
enum {is_storable = true};
|
1233
|
+
};
|
1234
|
+
|
1235
|
+
struct Simple : Storable {
|
1236
|
+
enum { is_simple = true,
|
1237
|
+
is_statically_allocatable = true
|
1238
|
+
};
|
1239
|
+
|
1240
|
+
# if Z_TRAIT_HAS(Type, is_literal)
|
1241
|
+
enum {is_literal = true};
|
1242
|
+
# endif
|
1243
|
+
|
1244
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_constructible)
|
1245
|
+
enum {is_trivially_copy_constructible = true};
|
1246
|
+
# endif
|
1247
|
+
|
1248
|
+
# if Z_TRAIT_HAS(Type, is_trivially_destructible)
|
1249
|
+
enum {is_trivially_destructible = true};
|
1250
|
+
# endif
|
1251
|
+
|
1252
|
+
//----------------------------------------------.
|
1253
|
+
// Unlike the standard C++ library, Z considers |
|
1254
|
+
// the following to be "true" for references: |
|
1255
|
+
//----------------------------------------------'
|
1256
|
+
|
1257
|
+
# if Z_TRAIT_HAS(Type, is_default_constructible)
|
1258
|
+
enum {is_default_constructible = true};
|
1259
|
+
# endif
|
1260
|
+
|
1261
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_assignable)
|
1262
|
+
enum {is_trivially_copy_assignable = true};
|
1263
|
+
# endif
|
1264
|
+
|
1265
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copyable)
|
1266
|
+
enum {is_trivially_copyable = true};
|
1267
|
+
# endif
|
1268
|
+
|
1269
|
+
# if Z_TRAIT_HAS(Type, is_trivially_default_constructible)
|
1270
|
+
enum {is_trivially_default_constructible = true};
|
1271
|
+
# endif
|
1272
|
+
};
|
1273
|
+
|
1274
|
+
struct Number : Simple {
|
1275
|
+
enum { is_arithmetic = true,
|
1276
|
+
is_fundamental = true,
|
1277
|
+
is_number = true,
|
1278
|
+
is_scalar = true
|
1279
|
+
};
|
1280
|
+
|
1281
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
1282
|
+
enum {is_pod = true};
|
1283
|
+
# endif
|
1284
|
+
};
|
1285
|
+
|
1286
|
+
struct Integral : Number {
|
1287
|
+
enum { is_exact = true,
|
1288
|
+
is_integral = true,
|
1289
|
+
};
|
1290
|
+
};
|
1291
|
+
|
1292
|
+
struct Natural : Integral {
|
1293
|
+
enum { is_natural = true,
|
1294
|
+
is_unsigned = true,
|
1295
|
+
is_signed_or_unsigned = true
|
1296
|
+
};
|
1297
|
+
enum {number_set = Z_NUMBER_SET_N};
|
1298
|
+
enum {minimum = 0};
|
1299
|
+
};
|
1300
|
+
|
1301
|
+
struct Integer : Integral {
|
1302
|
+
enum { is_integer = true,
|
1303
|
+
is_signed = true,
|
1304
|
+
is_signed_or_unsigned = true
|
1305
|
+
};
|
1306
|
+
enum {number_set = Z_NUMBER_SET_Z};
|
1307
|
+
};
|
1308
|
+
|
1309
|
+
struct Real : Number {
|
1310
|
+
enum { is_real = true,
|
1311
|
+
is_signed = true,
|
1312
|
+
is_signed_or_unsigned = true
|
1313
|
+
};
|
1314
|
+
enum {number_set = Z_NUMBER_SET_R};
|
1315
|
+
};
|
1316
|
+
|
1317
|
+
struct PointerLike : Simple {
|
1318
|
+
enum {is_scalar = true};
|
1319
|
+
|
1320
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
1321
|
+
enum {is_pod = true};
|
1322
|
+
# endif
|
1323
|
+
};
|
1324
|
+
|
1325
|
+
# if Z_TRAIT_HAS(Type, is_uint8)
|
1326
|
+
|
1327
|
+
struct UInt8 : Natural {
|
1328
|
+
enum {is_uint8 = true};
|
1329
|
+
|
1330
|
+
enum { value_type = Z_UINT8_VALUE_TYPE,
|
1331
|
+
fixed_value_type = Z_UINT8_FIXED_VALUE_TYPE,
|
1332
|
+
value_format = Z_UINT8_VALUE_FORMAT
|
1333
|
+
};
|
1334
|
+
enum {maximum = Z_UINT8_MAXIMUM};
|
1335
|
+
|
1336
|
+
typedef zuint8 type;
|
1337
|
+
typedef zuint8 to_unsigned;
|
1338
|
+
typedef zsint8 to_signed;
|
1339
|
+
};
|
1340
|
+
|
1341
|
+
# endif
|
1342
|
+
|
1343
|
+
# if Z_TRAIT_HAS(Type, is_sint8)
|
1344
|
+
|
1345
|
+
struct SInt8 : Integer {
|
1346
|
+
enum {is_sint8 = true};
|
1347
|
+
|
1348
|
+
enum { value_type = Z_SINT8_VALUE_TYPE,
|
1349
|
+
fixed_value_type = Z_SINT8_FIXED_VALUE_TYPE,
|
1350
|
+
value_format = Z_SINT8_VALUE_FORMAT
|
1351
|
+
};
|
1352
|
+
enum { minimum = Z_SINT8_MINIMUM,
|
1353
|
+
maximum = Z_SINT8_MAXIMUM
|
1354
|
+
};
|
1355
|
+
|
1356
|
+
typedef zsint8 type;
|
1357
|
+
typedef zuint8 to_unsigned;
|
1358
|
+
typedef zsint8 to_signed;
|
1359
|
+
};
|
1360
|
+
|
1361
|
+
# endif
|
1362
|
+
|
1363
|
+
# if Z_TRAIT_HAS(Type, is_uint16)
|
1364
|
+
|
1365
|
+
struct UInt16 : Natural {
|
1366
|
+
enum {is_uint16 = true};
|
1367
|
+
|
1368
|
+
enum { value_type = Z_UINT16_VALUE_TYPE,
|
1369
|
+
fixed_value_type = Z_UINT16_FIXED_VALUE_TYPE,
|
1370
|
+
value_format = Z_UINT16_VALUE_FORMAT
|
1371
|
+
};
|
1372
|
+
enum {maximum = Z_UINT16_MAXIMUM};
|
1373
|
+
|
1374
|
+
typedef zuint16 type;
|
1375
|
+
typedef zuint16 to_unsigned;
|
1376
|
+
typedef zsint16 to_signed;
|
1377
|
+
};
|
1378
|
+
|
1379
|
+
# endif
|
1380
|
+
|
1381
|
+
# if Z_TRAIT_HAS(Type, is_sint16)
|
1382
|
+
|
1383
|
+
struct SInt16 : Integer {
|
1384
|
+
enum {is_sint16 = true};
|
1385
|
+
|
1386
|
+
enum { value_type = Z_SINT16_VALUE_TYPE,
|
1387
|
+
fixed_value_type = Z_SINT16_FIXED_VALUE_TYPE,
|
1388
|
+
value_format = Z_SINT16_VALUE_FORMAT
|
1389
|
+
};
|
1390
|
+
enum { minimum = Z_SINT16_MINIMUM,
|
1391
|
+
maximum = Z_SINT16_MAXIMUM
|
1392
|
+
};
|
1393
|
+
|
1394
|
+
typedef zsint16 type;
|
1395
|
+
typedef zuint16 to_unsigned;
|
1396
|
+
typedef zsint16 to_signed;
|
1397
|
+
};
|
1398
|
+
|
1399
|
+
# endif
|
1400
|
+
|
1401
|
+
# if Z_TRAIT_HAS(Type, is_uint32)
|
1402
|
+
|
1403
|
+
struct UInt32 : Natural {
|
1404
|
+
enum {is_uint32 = true};
|
1405
|
+
|
1406
|
+
enum { value_type = Z_UINT32_VALUE_TYPE,
|
1407
|
+
fixed_value_type = Z_UINT32_FIXED_VALUE_TYPE,
|
1408
|
+
value_format = Z_UINT32_VALUE_FORMAT
|
1409
|
+
};
|
1410
|
+
enum {maximum = Z_UINT32_MAXIMUM};
|
1411
|
+
|
1412
|
+
typedef zuint32 type;
|
1413
|
+
typedef zuint32 to_unsigned;
|
1414
|
+
typedef zsint32 to_signed;
|
1415
|
+
};
|
1416
|
+
|
1417
|
+
# endif
|
1418
|
+
|
1419
|
+
# if Z_TRAIT_HAS(Type, is_sint32)
|
1420
|
+
|
1421
|
+
struct SInt32 : Integer {
|
1422
|
+
enum {is_sint32 = true};
|
1423
|
+
|
1424
|
+
enum { value_type = Z_SINT16_VALUE_TYPE,
|
1425
|
+
fixed_value_type = Z_SINT16_FIXED_VALUE_TYPE,
|
1426
|
+
value_format = Z_SINT16_VALUE_FORMAT
|
1427
|
+
};
|
1428
|
+
enum { minimum = Z_SINT32_MINIMUM,
|
1429
|
+
maximum = Z_SINT32_MAXIMUM
|
1430
|
+
};
|
1431
|
+
|
1432
|
+
typedef zsint32 type;
|
1433
|
+
typedef zuint32 to_unsigned;
|
1434
|
+
typedef zsint32 to_signed;
|
1435
|
+
};
|
1436
|
+
|
1437
|
+
# endif
|
1438
|
+
|
1439
|
+
# if Z_TRAIT_HAS(Type, is_uint64)
|
1440
|
+
|
1441
|
+
struct UInt64 : Natural {
|
1442
|
+
enum {is_uint64 = true};
|
1443
|
+
|
1444
|
+
enum { value_type = Z_UINT64_VALUE_TYPE,
|
1445
|
+
fixed_value_type = Z_UINT64_FIXED_VALUE_TYPE,
|
1446
|
+
value_format = Z_UINT64_VALUE_FORMAT
|
1447
|
+
};
|
1448
|
+
enum {maximum = Z_UINT64_MAXIMUM};
|
1449
|
+
|
1450
|
+
typedef zuint64 type;
|
1451
|
+
typedef zuint64 to_unsigned;
|
1452
|
+
|
1453
|
+
# ifdef Z_SINT64
|
1454
|
+
typedef zsint64 to_signed;
|
1455
|
+
# endif
|
1456
|
+
};
|
1457
|
+
|
1458
|
+
# endif
|
1459
|
+
|
1460
|
+
# if Z_TRAIT_HAS(Type, is_sint64)
|
1461
|
+
|
1462
|
+
struct SInt64 : Integer {
|
1463
|
+
enum {is_sint64 = true};
|
1464
|
+
|
1465
|
+
enum { value_type = Z_SINT64_VALUE_TYPE,
|
1466
|
+
fixed_value_type = Z_SINT64_FIXED_VALUE_TYPE,
|
1467
|
+
value_format = Z_SINT64_VALUE_FORMAT
|
1468
|
+
};
|
1469
|
+
enum { minimum = Z_SINT64_MINIMUM,
|
1470
|
+
maximum = Z_SINT64_MAXIMUM
|
1471
|
+
};
|
1472
|
+
|
1473
|
+
typedef zsint64 type;
|
1474
|
+
typedef zsint64 to_signed;
|
1475
|
+
|
1476
|
+
# ifdef Z_UINT64
|
1477
|
+
typedef zuint64 to_unsigned;
|
1478
|
+
# endif
|
1479
|
+
};
|
1480
|
+
|
1481
|
+
# endif
|
1482
|
+
|
1483
|
+
# if Z_TRAIT_HAS(Type, is_uint128)
|
1484
|
+
|
1485
|
+
struct UInt128 : Natural {
|
1486
|
+
enum {is_uint128 = true};
|
1487
|
+
|
1488
|
+
enum { value_type = Z_UINT128_VALUE_TYPE,
|
1489
|
+
fixed_value_type = Z_UINT128_FIXED_VALUE_TYPE,
|
1490
|
+
value_format = Z_UINT128_VALUE_FORMAT
|
1491
|
+
};
|
1492
|
+
enum {maximum = Z_UINT128_MAXIMUM};
|
1493
|
+
|
1494
|
+
typedef zuint128 type;
|
1495
|
+
typedef zuint128 to_unsigned;
|
1496
|
+
|
1497
|
+
# ifdef Z_SINT128
|
1498
|
+
typedef zsint128 to_signed;
|
1499
|
+
# endif
|
1500
|
+
};
|
1501
|
+
|
1502
|
+
# endif
|
1503
|
+
|
1504
|
+
# if Z_TRAIT_HAS(Type, is_sint128)
|
1505
|
+
|
1506
|
+
struct SInt128 : Integer {
|
1507
|
+
enum {is_sint128 = true};
|
1508
|
+
|
1509
|
+
enum { value_type = Z_SINT128_VALUE_TYPE,
|
1510
|
+
fixed_value_type = Z_SINT128_FIXED_VALUE_TYPE,
|
1511
|
+
value_format = Z_SINT128_VALUE_FORMAT
|
1512
|
+
};
|
1513
|
+
enum { minimum = Z_SINT128_MINIMUM,
|
1514
|
+
maximum = Z_SINT128_MAXIMUM
|
1515
|
+
};
|
1516
|
+
|
1517
|
+
typedef zsint128 type;
|
1518
|
+
typedef zsint128 to_signed;
|
1519
|
+
|
1520
|
+
# ifdef Z_UINT128
|
1521
|
+
typedef zuint128 to_unsigned;
|
1522
|
+
# endif
|
1523
|
+
};
|
1524
|
+
|
1525
|
+
# endif
|
1526
|
+
|
1527
|
+
# if Z_TRAIT_HAS(Type, is_float16)
|
1528
|
+
|
1529
|
+
struct Float16 : Real {
|
1530
|
+
enum {is_float16 = true};
|
1531
|
+
|
1532
|
+
enum { value_type = Z_FLOAT16_VALUE_TYPE,
|
1533
|
+
fixed_value_type = Z_FLOAT16_FIXED_VALUE_TYPE,
|
1534
|
+
value_format = Z_FLOAT16_VALUE_FORMAT
|
1535
|
+
};
|
1536
|
+
enum { bias = Z_FLOAT16_BIAS,
|
1537
|
+
decimal_digits = Z_FLOAT16_DECIMAL_DIGITS,
|
1538
|
+
significand_offset = Z_FLOAT16_SIGNIFICAND_OFFSET,
|
1539
|
+
significand_bits = Z_FLOAT16_SIGNIFICAND_BITS,
|
1540
|
+
significand_digits = Z_FLOAT16_SIGNIFICAND_DIGITS,
|
1541
|
+
exponent_offset = Z_FLOAT16_EXPONENT_OFFSET,
|
1542
|
+
exponent_bits = Z_FLOAT16_EXPONENT_BITS,
|
1543
|
+
exponent_radix = Z_FLOAT16_EXPONENT_RADIX,
|
1544
|
+
sign_offset = Z_FLOAT16_SIGN_OFFSET,
|
1545
|
+
sign_bits = Z_FLOAT16_SIGN_BITS
|
1546
|
+
};
|
1547
|
+
enum { exponent_minimum = Z_FLOAT16_EXPONENT_MINIMUM,
|
1548
|
+
exponent_maximum = Z_FLOAT16_EXPONENT_MAXIMUM,
|
1549
|
+
exponent_10_minimum = Z_FLOAT16_EXPONENT_10_MINIMUM,
|
1550
|
+
exponent_10_maximum = Z_FLOAT16_EXPONENT_10_MAXIMUM
|
1551
|
+
};
|
1552
|
+
|
1553
|
+
static Z_CT(CPP11) zfloat16 epsilon () {return Z_FLOAT16_EPSILON;}
|
1554
|
+
static Z_CT(CPP11) zfloat16 minimum () {return Z_FLOAT16_MINIMUM;}
|
1555
|
+
static Z_CT(CPP11) zfloat16 maximum () {return Z_FLOAT16_MAXIMUM;}
|
1556
|
+
/* static Z_CT(CPP11) zfloat16 infinity() Z_NO_EXCEPTION {return Z_FLOAT16_INFINITY;}
|
1557
|
+
static Z_CT(CPP11) zfloat16 nan () Z_NO_EXCEPTION {return Z_FLOAT16_NAN;}*/
|
1558
|
+
|
1559
|
+
typedef zfloat16 type;
|
1560
|
+
typedef zfloat16 to_signed;
|
1561
|
+
};
|
1562
|
+
|
1563
|
+
# endif
|
1564
|
+
|
1565
|
+
# if Z_TRAIT_HAS(Type, is_float32)
|
1566
|
+
|
1567
|
+
struct Float32 : Real {
|
1568
|
+
enum {is_float32 = true};
|
1569
|
+
|
1570
|
+
enum { value_type = Z_FLOAT32_VALUE_TYPE,
|
1571
|
+
fixed_value_type = Z_FLOAT32_FIXED_VALUE_TYPE,
|
1572
|
+
value_format = Z_FLOAT32_VALUE_FORMAT
|
1573
|
+
};
|
1574
|
+
enum { bias = Z_FLOAT32_BIAS,
|
1575
|
+
decimal_digits = Z_FLOAT32_DECIMAL_DIGITS,
|
1576
|
+
significand_offset = Z_FLOAT32_SIGNIFICAND_OFFSET,
|
1577
|
+
significand_bits = Z_FLOAT32_SIGNIFICAND_BITS,
|
1578
|
+
significand_digits = Z_FLOAT32_SIGNIFICAND_DIGITS,
|
1579
|
+
exponent_offset = Z_FLOAT32_EXPONENT_OFFSET,
|
1580
|
+
exponent_bits = Z_FLOAT32_EXPONENT_BITS,
|
1581
|
+
exponent_radix = Z_FLOAT32_EXPONENT_RADIX,
|
1582
|
+
sign_offset = Z_FLOAT32_SIGN_OFFSET,
|
1583
|
+
sign_bits = Z_FLOAT32_SIGN_BITS
|
1584
|
+
};
|
1585
|
+
enum { exponent_minimum = Z_FLOAT32_EXPONENT_MINIMUM,
|
1586
|
+
exponent_maximum = Z_FLOAT32_EXPONENT_MAXIMUM,
|
1587
|
+
exponent_10_minimum = Z_FLOAT32_EXPONENT_10_MINIMUM,
|
1588
|
+
exponent_10_maximum = Z_FLOAT32_EXPONENT_10_MAXIMUM
|
1589
|
+
};
|
1590
|
+
|
1591
|
+
static Z_CT(CPP11) zfloat32 epsilon () {return Z_FLOAT32_EPSILON;}
|
1592
|
+
static Z_CT(CPP11) zfloat32 minimum () {return Z_FLOAT32_MINIMUM;}
|
1593
|
+
static Z_CT(CPP11) zfloat32 maximum () {return Z_FLOAT32_MAXIMUM;}
|
1594
|
+
/* static Z_CT(CPP11) zfloat32 infinity() Z_NO_EXCEPTION {return Z_FLOAT32_INFINITY;}
|
1595
|
+
static Z_CT(CPP11) zfloat32 nan () Z_NO_EXCEPTION {return Z_FLOAT32_NAN;}*/
|
1596
|
+
|
1597
|
+
typedef zfloat32 type;
|
1598
|
+
typedef zfloat32 to_signed;
|
1599
|
+
};
|
1600
|
+
|
1601
|
+
# endif
|
1602
|
+
|
1603
|
+
# if Z_TRAIT_HAS(Type, is_float64)
|
1604
|
+
|
1605
|
+
struct Float64 : Real {
|
1606
|
+
enum {is_float64 = true};
|
1607
|
+
|
1608
|
+
enum { value_type = Z_FLOAT64_VALUE_TYPE,
|
1609
|
+
fixed_value_type = Z_FLOAT64_FIXED_VALUE_TYPE,
|
1610
|
+
value_format = Z_FLOAT64_VALUE_FORMAT
|
1611
|
+
};
|
1612
|
+
enum { bias = Z_FLOAT64_BIAS,
|
1613
|
+
decimal_digits = Z_FLOAT64_DECIMAL_DIGITS,
|
1614
|
+
significand_offset = Z_FLOAT64_SIGNIFICAND_OFFSET,
|
1615
|
+
significand_bits = Z_FLOAT64_SIGNIFICAND_BITS,
|
1616
|
+
significand_digits = Z_FLOAT64_SIGNIFICAND_DIGITS,
|
1617
|
+
exponent_offset = Z_FLOAT64_EXPONENT_OFFSET,
|
1618
|
+
exponent_bits = Z_FLOAT64_EXPONENT_BITS,
|
1619
|
+
exponent_radix = Z_FLOAT64_EXPONENT_RADIX,
|
1620
|
+
sign_offset = Z_FLOAT64_SIGN_OFFSET,
|
1621
|
+
sign_bits = Z_FLOAT64_SIGN_BITS
|
1622
|
+
};
|
1623
|
+
enum { exponent_minimum = Z_FLOAT64_EXPONENT_MINIMUM,
|
1624
|
+
exponent_maximum = Z_FLOAT64_EXPONENT_MAXIMUM,
|
1625
|
+
exponent_10_minimum = Z_FLOAT64_EXPONENT_10_MINIMUM,
|
1626
|
+
exponent_10_maximum = Z_FLOAT64_EXPONENT_10_MAXIMUM
|
1627
|
+
};
|
1628
|
+
|
1629
|
+
static Z_CT(CPP11) zfloat64 epsilon () {return Z_FLOAT64_EPSILON;}
|
1630
|
+
static Z_CT(CPP11) zfloat64 minimum () {return Z_FLOAT64_MINIMUM;}
|
1631
|
+
static Z_CT(CPP11) zfloat64 maximum () {return Z_FLOAT64_MAXIMUM;}
|
1632
|
+
/* static Z_CT(CPP11) zfloat64 infinity() Z_NO_EXCEPTION {return Z_FLOAT64_INFINITY;}
|
1633
|
+
static Z_CT(CPP11) zfloat64 nan () Z_NO_EXCEPTION {return Z_FLOAT64_NAN;}*/
|
1634
|
+
|
1635
|
+
typedef zfloat64 type;
|
1636
|
+
typedef zfloat64 to_signed;
|
1637
|
+
};
|
1638
|
+
|
1639
|
+
# endif
|
1640
|
+
|
1641
|
+
# if Z_TRAIT_HAS(Type, is_float128)
|
1642
|
+
|
1643
|
+
struct Float128 : Real {
|
1644
|
+
enum {is_float128 = true};
|
1645
|
+
|
1646
|
+
enum { value_type = Z_FLOAT128_VALUE_TYPE,
|
1647
|
+
fixed_value_type = Z_FLOAT128_FIXED_VALUE_TYPE,
|
1648
|
+
value_format = Z_FLOAT128_VALUE_FORMAT
|
1649
|
+
};
|
1650
|
+
enum { bias = Z_FLOAT128_BIAS,
|
1651
|
+
decimal_digits = Z_FLOAT128_DECIMAL_DIGITS,
|
1652
|
+
significand_offset = Z_FLOAT128_SIGNIFICAND_OFFSET,
|
1653
|
+
significand_bits = Z_FLOAT128_SIGNIFICAND_BITS,
|
1654
|
+
significand_digits = Z_FLOAT128_SIGNIFICAND_DIGITS,
|
1655
|
+
exponent_offset = Z_FLOAT128_EXPONENT_OFFSET,
|
1656
|
+
exponent_bits = Z_FLOAT128_EXPONENT_BITS,
|
1657
|
+
exponent_radix = Z_FLOAT128_EXPONENT_RADIX,
|
1658
|
+
sign_offset = Z_FLOAT128_SIGN_OFFSET,
|
1659
|
+
sign_bits = Z_FLOAT128_SIGN_BITS
|
1660
|
+
};
|
1661
|
+
enum { exponent_minimum = Z_FLOAT128_EXPONENT_MINIMUM,
|
1662
|
+
exponent_maximum = Z_FLOAT128_EXPONENT_MAXIMUM,
|
1663
|
+
exponent_10_minimum = Z_FLOAT128_EXPONENT_10_MINIMUM,
|
1664
|
+
exponent_10_maximum = Z_FLOAT128_EXPONENT_10_MAXIMUM
|
1665
|
+
};
|
1666
|
+
|
1667
|
+
static Z_CT(CPP11) zfloat128 epsilon () {return Z_FLOAT128_EPSILON;}
|
1668
|
+
static Z_CT(CPP11) zfloat128 minimum () {return Z_FLOAT128_MINIMUM;}
|
1669
|
+
static Z_CT(CPP11) zfloat128 maximum () {return Z_FLOAT128_MAXIMUM;}
|
1670
|
+
/* static Z_CT(CPP11) zfloat128 infinity() Z_NO_EXCEPTION {return Z_FLOAT128_INFINITY;}
|
1671
|
+
static Z_CT(CPP11) zfloat128 nan () Z_NO_EXCEPTION {return Z_FLOAT128_NAN;}*/
|
1672
|
+
|
1673
|
+
typedef zfloat128 type;
|
1674
|
+
typedef zfloat128 to_signed;
|
1675
|
+
};
|
1676
|
+
|
1677
|
+
# endif
|
1678
|
+
|
1679
|
+
# if Z_TRAIT_HAS(Type, is_float80_x87)
|
1680
|
+
|
1681
|
+
struct Float80_x87 : Real {
|
1682
|
+
enum {is_float80_x87 = true};
|
1683
|
+
|
1684
|
+
enum { value_type = Z_FLOAT80_X87_VALUE_TYPE,
|
1685
|
+
fixed_value_type = Z_FLOAT80_X87_FIXED_VALUE_TYPE,
|
1686
|
+
value_format = Z_FLOAT80_X87_VALUE_FORMAT
|
1687
|
+
};
|
1688
|
+
enum { bias = Z_FLOAT80_X87_BIAS,
|
1689
|
+
decimal_digits = Z_FLOAT80_X87_DECIMAL_DIGITS,
|
1690
|
+
significand_offset = Z_FLOAT80_X87_SIGNIFICAND_OFFSET,
|
1691
|
+
significand_bits = Z_FLOAT80_X87_SIGNIFICAND_BITS,
|
1692
|
+
significand_digits = Z_FLOAT80_X87_SIGNIFICAND_DIGITS,
|
1693
|
+
exponent_offset = Z_FLOAT80_X87_EXPONENT_OFFSET,
|
1694
|
+
exponent_bits = Z_FLOAT80_X87_EXPONENT_BITS,
|
1695
|
+
exponent_radix = Z_FLOAT80_X87_EXPONENT_RADIX,
|
1696
|
+
sign_offset = Z_FLOAT80_X87_SIGN_OFFSET,
|
1697
|
+
sign_bits = Z_FLOAT80_X87_SIGN_BITS
|
1698
|
+
};
|
1699
|
+
enum { exponent_minimum = Z_FLOAT80_X87_EXPONENT_MINIMUM,
|
1700
|
+
exponent_maximum = Z_FLOAT80_X87_EXPONENT_MAXIMUM,
|
1701
|
+
exponent_10_minimum = Z_FLOAT80_X87_EXPONENT_10_MINIMUM,
|
1702
|
+
exponent_10_maximum = Z_FLOAT80_X87_EXPONENT_10_MAXIMUM
|
1703
|
+
};
|
1704
|
+
|
1705
|
+
static Z_CT(CPP11) zfloat80_x87 epsilon () {return Z_FLOAT80_X87_EPSILON;}
|
1706
|
+
static Z_CT(CPP11) zfloat80_x87 minimum () {return Z_FLOAT80_X87_MINIMUM;}
|
1707
|
+
static Z_CT(CPP11) zfloat80_x87 maximum () {return Z_FLOAT80_X87_MAXIMUM;}
|
1708
|
+
/* static Z_CT(CPP11) zfloat80_x87 infinity() Z_NO_EXCEPTION {return Z_FLOAT80_X87_INFINITY;}
|
1709
|
+
static Z_CT(CPP11) zfloat80_x87 nan () Z_NO_EXCEPTION {return Z_FLOAT80_X87_NAN;}*/
|
1710
|
+
|
1711
|
+
typedef zfloat80_x87 type;
|
1712
|
+
typedef zfloat80_x87 to_signed;
|
1713
|
+
};
|
1714
|
+
|
1715
|
+
# endif
|
1716
|
+
|
1717
|
+
# if Z_TRAIT_HAS(Type, is_float96_x87)
|
1718
|
+
|
1719
|
+
struct Float96_x87 : Real {
|
1720
|
+
enum {is_float96_x87 = true};
|
1721
|
+
|
1722
|
+
enum { value_type = Z_FLOAT96_X87_VALUE_TYPE,
|
1723
|
+
fixed_value_type = Z_FLOAT96_X87_FIXED_VALUE_TYPE,
|
1724
|
+
value_format = Z_FLOAT96_X87_VALUE_FORMAT
|
1725
|
+
};
|
1726
|
+
enum { bias = Z_FLOAT96_X87_BIAS,
|
1727
|
+
decimal_digits = Z_FLOAT96_X87_DECIMAL_DIGITS,
|
1728
|
+
significand_offset = Z_FLOAT96_X87_SIGNIFICAND_OFFSET,
|
1729
|
+
significand_bits = Z_FLOAT96_X87_SIGNIFICAND_BITS,
|
1730
|
+
significand_digits = Z_FLOAT96_X87_SIGNIFICAND_DIGITS,
|
1731
|
+
exponent_offset = Z_FLOAT96_X87_EXPONENT_OFFSET,
|
1732
|
+
exponent_bits = Z_FLOAT96_X87_EXPONENT_BITS,
|
1733
|
+
exponent_radix = Z_FLOAT96_X87_EXPONENT_RADIX,
|
1734
|
+
sign_offset = Z_FLOAT96_X87_SIGN_OFFSET,
|
1735
|
+
sign_bits = Z_FLOAT96_X87_SIGN_BITS
|
1736
|
+
};
|
1737
|
+
enum { exponent_minimum = Z_FLOAT96_X87_EXPONENT_MINIMUM,
|
1738
|
+
exponent_maximum = Z_FLOAT96_X87_EXPONENT_MAXIMUM,
|
1739
|
+
exponent_10_minimum = Z_FLOAT96_X87_EXPONENT_10_MINIMUM,
|
1740
|
+
exponent_10_maximum = Z_FLOAT96_X87_EXPONENT_10_MAXIMUM
|
1741
|
+
};
|
1742
|
+
|
1743
|
+
static Z_CT(CPP11) zfloat96_x87 epsilon () {return Z_FLOAT96_X87_EPSILON;}
|
1744
|
+
static Z_CT(CPP11) zfloat96_x87 minimum () {return Z_FLOAT96_X87_MINIMUM;}
|
1745
|
+
static Z_CT(CPP11) zfloat96_x87 maximum () {return Z_FLOAT96_X87_MAXIMUM;}
|
1746
|
+
/* static Z_CT(CPP11) zfloat96_x87 infinity() Z_NO_EXCEPTION {return Z_FLOAT96_X87_INFINITY;}
|
1747
|
+
static Z_CT(CPP11) zfloat96_x87 nan () Z_NO_EXCEPTION {return Z_FLOAT96_X87_NAN;}*/
|
1748
|
+
|
1749
|
+
typedef zfloat96_x87 type;
|
1750
|
+
typedef zfloat96_x87 to_signed;
|
1751
|
+
};
|
1752
|
+
|
1753
|
+
# endif
|
1754
|
+
|
1755
|
+
# if Z_TRAIT_HAS(Type, is_float128_x87)
|
1756
|
+
|
1757
|
+
struct Float128_x87 : Real {
|
1758
|
+
enum {is_float128_x87 = true};
|
1759
|
+
|
1760
|
+
enum { value_type = Z_FLOAT128_X87_VALUE_TYPE,
|
1761
|
+
fixed_value_type = Z_FLOAT128_X87_FIXED_VALUE_TYPE,
|
1762
|
+
value_format = Z_FLOAT128_X87_VALUE_FORMAT
|
1763
|
+
};
|
1764
|
+
enum { bias = Z_FLOAT128_X87_BIAS,
|
1765
|
+
decimal_digits = Z_FLOAT128_X87_DECIMAL_DIGITS,
|
1766
|
+
significand_offset = Z_FLOAT128_X87_SIGNIFICAND_OFFSET,
|
1767
|
+
significand_bits = Z_FLOAT128_X87_SIGNIFICAND_BITS,
|
1768
|
+
significand_digits = Z_FLOAT128_X87_SIGNIFICAND_DIGITS,
|
1769
|
+
exponent_offset = Z_FLOAT128_X87_EXPONENT_OFFSET,
|
1770
|
+
exponent_bits = Z_FLOAT128_X87_EXPONENT_BITS,
|
1771
|
+
exponent_radix = Z_FLOAT128_X87_EXPONENT_RADIX,
|
1772
|
+
sign_offset = Z_FLOAT128_X87_SIGN_OFFSET,
|
1773
|
+
sign_bits = Z_FLOAT128_X87_SIGN_BITS
|
1774
|
+
};
|
1775
|
+
enum { exponent_minimum = Z_FLOAT128_X87_EXPONENT_MINIMUM,
|
1776
|
+
exponent_maximum = Z_FLOAT128_X87_EXPONENT_MAXIMUM,
|
1777
|
+
exponent_10_minimum = Z_FLOAT128_X87_EXPONENT_10_MINIMUM,
|
1778
|
+
exponent_10_maximum = Z_FLOAT128_X87_EXPONENT_10_MAXIMUM
|
1779
|
+
};
|
1780
|
+
|
1781
|
+
static Z_CT(CPP11) zfloat128_x87 epsilon () {return Z_FLOAT128_X87_EPSILON;}
|
1782
|
+
static Z_CT(CPP11) zfloat128_x87 minimum () {return Z_FLOAT128_X87_MINIMUM;}
|
1783
|
+
static Z_CT(CPP11) zfloat128_x87 maximum () {return Z_FLOAT128_X87_MAXIMUM;}
|
1784
|
+
/* static Z_CT(CPP11) zfloat128_x87 infinity() Z_NO_EXCEPTION {return Z_FLOAT128_X87_INFINITY;}
|
1785
|
+
static Z_CT(CPP11) zfloat128_x87 nan () Z_NO_EXCEPTION {return Z_FLOAT128_X87_NAN;}*/
|
1786
|
+
|
1787
|
+
typedef zfloat128_x87 type;
|
1788
|
+
typedef zfloat128_x87 to_signed;
|
1789
|
+
};
|
1790
|
+
|
1791
|
+
# endif
|
1792
|
+
|
1793
|
+
struct Void : Valid {
|
1794
|
+
enum { is_fundamental = true,
|
1795
|
+
is_void = true
|
1796
|
+
};
|
1797
|
+
|
1798
|
+
# if Z_TRAIT_HAS(Type, is_literal)
|
1799
|
+
enum {is_literal = true};
|
1800
|
+
# endif
|
1801
|
+
|
1802
|
+
typedef void type;
|
1803
|
+
};
|
1804
|
+
|
1805
|
+
struct Char : TernaryType<Z_CHAR_IS_SIGNED, Integer, Natural>::type {
|
1806
|
+
enum {is_char = true};
|
1807
|
+
|
1808
|
+
enum { value_type = Z_CHAR_VALUE_TYPE,
|
1809
|
+
fixed_value_type = Z_CHAR_FIXED_VALUE_TYPE,
|
1810
|
+
value_format = Z_CHAR_VALUE_FORMAT
|
1811
|
+
};
|
1812
|
+
enum { minimum = Z_CHAR_MINIMUM,
|
1813
|
+
maximum = Z_CHAR_MAXIMUM
|
1814
|
+
};
|
1815
|
+
|
1816
|
+
typedef zchar type;
|
1817
|
+
typedef zuchar to_unsigned;
|
1818
|
+
typedef zschar to_signed;
|
1819
|
+
};
|
1820
|
+
|
1821
|
+
struct UChar : Natural {
|
1822
|
+
enum {is_uchar = true};
|
1823
|
+
|
1824
|
+
enum { value_type = Z_UCHAR_VALUE_TYPE,
|
1825
|
+
fixed_value_type = Z_UCHAR_FIXED_VALUE_TYPE,
|
1826
|
+
value_format = Z_UCHAR_VALUE_FORMAT
|
1827
|
+
};
|
1828
|
+
enum {maximum = Z_UCHAR_MAXIMUM};
|
1829
|
+
|
1830
|
+
typedef zuchar type;
|
1831
|
+
typedef zuchar to_unsigned;
|
1832
|
+
typedef zschar to_signed;
|
1833
|
+
};
|
1834
|
+
|
1835
|
+
struct SChar : Integer {
|
1836
|
+
enum {is_schar = true};
|
1837
|
+
|
1838
|
+
enum { value_type = Z_SCHAR_VALUE_TYPE,
|
1839
|
+
fixed_value_type = Z_SCHAR_FIXED_VALUE_TYPE,
|
1840
|
+
value_format = Z_SCHAR_VALUE_FORMAT
|
1841
|
+
};
|
1842
|
+
enum { minimum = Z_SCHAR_MINIMUM,
|
1843
|
+
maximum = Z_SCHAR_MAXIMUM
|
1844
|
+
};
|
1845
|
+
|
1846
|
+
typedef zschar type;
|
1847
|
+
typedef zuchar to_unsigned;
|
1848
|
+
typedef zschar to_signed;
|
1849
|
+
};
|
1850
|
+
|
1851
|
+
struct UShort : Natural {
|
1852
|
+
enum {is_ushort = true};
|
1853
|
+
|
1854
|
+
enum { value_type = Z_USHORT_VALUE_TYPE,
|
1855
|
+
fixed_value_type = Z_USHORT_FIXED_VALUE_TYPE,
|
1856
|
+
value_format = Z_USHORT_VALUE_FORMAT
|
1857
|
+
};
|
1858
|
+
enum {maximum = Z_USHORT_MAXIMUM};
|
1859
|
+
|
1860
|
+
typedef zushort type;
|
1861
|
+
typedef zushort to_unsigned;
|
1862
|
+
typedef zsshort to_signed;
|
1863
|
+
};
|
1864
|
+
|
1865
|
+
struct SShort : Integer {
|
1866
|
+
enum {is_sshort = true};
|
1867
|
+
|
1868
|
+
enum { value_type = Z_SSHORT_VALUE_TYPE,
|
1869
|
+
fixed_value_type = Z_SSHORT_FIXED_VALUE_TYPE,
|
1870
|
+
value_format = Z_SSHORT_VALUE_FORMAT
|
1871
|
+
};
|
1872
|
+
enum { minimum = Z_SSHORT_MINIMUM,
|
1873
|
+
maximum = Z_SSHORT_MAXIMUM
|
1874
|
+
};
|
1875
|
+
|
1876
|
+
typedef zsshort type;
|
1877
|
+
typedef zushort to_unsigned;
|
1878
|
+
typedef zsshort to_signed;
|
1879
|
+
};
|
1880
|
+
|
1881
|
+
struct UInt : Natural {
|
1882
|
+
enum {is_uint = true};
|
1883
|
+
|
1884
|
+
enum { value_type = Z_UINT_VALUE_TYPE,
|
1885
|
+
fixed_value_type = Z_UINT_FIXED_VALUE_TYPE,
|
1886
|
+
value_format = Z_UINT_VALUE_FORMAT
|
1887
|
+
};
|
1888
|
+
enum {maximum = Z_UINT_MAXIMUM};
|
1889
|
+
|
1890
|
+
typedef zuint type;
|
1891
|
+
typedef zuint to_unsigned;
|
1892
|
+
typedef zsint to_signed;
|
1893
|
+
};
|
1894
|
+
|
1895
|
+
struct SInt : Integer {
|
1896
|
+
enum {is_sint = true};
|
1897
|
+
|
1898
|
+
enum { value_type = Z_SINT_VALUE_TYPE,
|
1899
|
+
fixed_value_type = Z_SINT_FIXED_VALUE_TYPE,
|
1900
|
+
value_format = Z_SINT_VALUE_FORMAT
|
1901
|
+
};
|
1902
|
+
enum { minimum = Z_SINT_MINIMUM,
|
1903
|
+
maximum = Z_SINT_MAXIMUM
|
1904
|
+
};
|
1905
|
+
|
1906
|
+
typedef zsint type;
|
1907
|
+
typedef zuint to_unsigned;
|
1908
|
+
typedef zsint to_signed;
|
1909
|
+
};
|
1910
|
+
|
1911
|
+
struct ULong : Natural {
|
1912
|
+
enum {is_ulong = true};
|
1913
|
+
|
1914
|
+
enum { value_type = Z_ULONG_VALUE_TYPE,
|
1915
|
+
fixed_value_type = Z_ULONG_FIXED_VALUE_TYPE,
|
1916
|
+
value_format = Z_ULONG_VALUE_FORMAT
|
1917
|
+
};
|
1918
|
+
enum {maximum = Z_ULONG_MAXIMUM};
|
1919
|
+
|
1920
|
+
typedef zulong type;
|
1921
|
+
typedef zulong to_unsigned;
|
1922
|
+
typedef zslong to_signed;
|
1923
|
+
|
1924
|
+
};
|
1925
|
+
|
1926
|
+
struct SLong : Integer {
|
1927
|
+
enum {is_slong = true};
|
1928
|
+
|
1929
|
+
enum { value_type = Z_SLONG_VALUE_TYPE,
|
1930
|
+
fixed_value_type = Z_SLONG_FIXED_VALUE_TYPE,
|
1931
|
+
value_format = Z_SLONG_VALUE_FORMAT
|
1932
|
+
};
|
1933
|
+
enum { minimum = Z_SLONG_MINIMUM,
|
1934
|
+
maximum = Z_SLONG_MAXIMUM
|
1935
|
+
};
|
1936
|
+
|
1937
|
+
typedef zslong type;
|
1938
|
+
typedef zulong to_unsigned;
|
1939
|
+
typedef zslong to_signed;
|
1940
|
+
};
|
1941
|
+
|
1942
|
+
# ifdef Z_LLONG
|
1943
|
+
|
1944
|
+
struct ULLong : Natural {
|
1945
|
+
enum {is_ullong = true};
|
1946
|
+
|
1947
|
+
enum { value_type = Z_ULLONG_VALUE_TYPE,
|
1948
|
+
fixed_value_type = Z_ULLONG_FIXED_VALUE_TYPE,
|
1949
|
+
value_format = Z_ULLONG_VALUE_FORMAT
|
1950
|
+
};
|
1951
|
+
enum {maximum = Z_ULLONG_MAXIMUM};
|
1952
|
+
|
1953
|
+
typedef zullong type;
|
1954
|
+
typedef zullong to_unsigned;
|
1955
|
+
|
1956
|
+
# ifdef Z_SLLONG
|
1957
|
+
typedef zsllong to_signed;
|
1958
|
+
# endif
|
1959
|
+
};
|
1960
|
+
|
1961
|
+
struct SLLong : Integer {
|
1962
|
+
enum {is_sllong = true};
|
1963
|
+
|
1964
|
+
enum { value_type = Z_SLLONG_VALUE_TYPE,
|
1965
|
+
fixed_value_type = Z_SLLONG_FIXED_VALUE_TYPE,
|
1966
|
+
value_format = Z_SLLONG_VALUE_FORMAT
|
1967
|
+
};
|
1968
|
+
enum { minimum = Z_SLLONG_MINIMUM,
|
1969
|
+
maximum = Z_SLLONG_MAXIMUM
|
1970
|
+
};
|
1971
|
+
|
1972
|
+
typedef zsllong type;
|
1973
|
+
typedef zsllong to_signed;
|
1974
|
+
|
1975
|
+
# ifdef Z_ULLONG
|
1976
|
+
typedef zullong to_unsigned;
|
1977
|
+
# endif
|
1978
|
+
};
|
1979
|
+
|
1980
|
+
# endif
|
1981
|
+
|
1982
|
+
# if Z_TRAIT_HAS(Type, is_float)
|
1983
|
+
|
1984
|
+
struct Float : Real {
|
1985
|
+
enum {is_float = true};
|
1986
|
+
|
1987
|
+
enum { value_type = Z_FLOAT_VALUE_TYPE,
|
1988
|
+
fixed_value_type = Z_FLOAT_FIXED_VALUE_TYPE,
|
1989
|
+
value_format = Z_FLOAT_VALUE_FORMAT
|
1990
|
+
};
|
1991
|
+
enum { bias = Z_FLOAT_BIAS,
|
1992
|
+
decimal_digits = Z_FLOAT_DECIMAL_DIGITS,
|
1993
|
+
significand_offset = Z_FLOAT_SIGNIFICAND_OFFSET,
|
1994
|
+
significand_bits = Z_FLOAT_SIGNIFICAND_BITS,
|
1995
|
+
significand_digits = Z_FLOAT_SIGNIFICAND_DIGITS,
|
1996
|
+
exponent_offset = Z_FLOAT_EXPONENT_OFFSET,
|
1997
|
+
exponent_bits = Z_FLOAT_EXPONENT_BITS,
|
1998
|
+
exponent_radix = Z_FLOAT_EXPONENT_RADIX,
|
1999
|
+
sign_offset = Z_FLOAT_SIGN_OFFSET,
|
2000
|
+
sign_bits = Z_FLOAT_SIGN_BITS
|
2001
|
+
};
|
2002
|
+
enum { exponent_minimum = Z_FLOAT_EXPONENT_MINIMUM,
|
2003
|
+
exponent_maximum = Z_FLOAT_EXPONENT_MAXIMUM,
|
2004
|
+
exponent_10_minimum = Z_FLOAT_EXPONENT_10_MINIMUM,
|
2005
|
+
exponent_10_maximum = Z_FLOAT_EXPONENT_10_MAXIMUM
|
2006
|
+
};
|
2007
|
+
|
2008
|
+
static Z_CT(CPP11) zfloat epsilon () {return Z_FLOAT_EPSILON;}
|
2009
|
+
static Z_CT(CPP11) zfloat minimum () {return Z_FLOAT_MINIMUM;}
|
2010
|
+
static Z_CT(CPP11) zfloat maximum () {return Z_FLOAT_MAXIMUM;}
|
2011
|
+
/* static Z_CT(CPP11) zfloat infinity() Z_NO_EXCEPTION {return Z_FLOAT_INFINITY;}
|
2012
|
+
static Z_CT(CPP11) zfloat nan () Z_NO_EXCEPTION {return Z_FLOAT_NAN;}*/
|
2013
|
+
|
2014
|
+
typedef zfloat type;
|
2015
|
+
typedef zfloat to_signed;
|
2016
|
+
};
|
2017
|
+
|
2018
|
+
# endif
|
2019
|
+
|
2020
|
+
# if Z_TRAIT_HAS(Type, is_double)
|
2021
|
+
|
2022
|
+
struct Double : Real {
|
2023
|
+
enum {is_double = true};
|
2024
|
+
|
2025
|
+
enum { value_type = Z_DOUBLE_VALUE_TYPE,
|
2026
|
+
fixed_value_type = Z_DOUBLE_FIXED_VALUE_TYPE,
|
2027
|
+
value_format = Z_DOUBLE_VALUE_FORMAT
|
2028
|
+
};
|
2029
|
+
enum { bias = Z_DOUBLE_BIAS,
|
2030
|
+
decimal_digits = Z_DOUBLE_DECIMAL_DIGITS,
|
2031
|
+
significand_offset = Z_DOUBLE_SIGNIFICAND_OFFSET,
|
2032
|
+
significand_bits = Z_DOUBLE_SIGNIFICAND_BITS,
|
2033
|
+
significand_digits = Z_DOUBLE_SIGNIFICAND_DIGITS,
|
2034
|
+
exponent_offset = Z_DOUBLE_EXPONENT_OFFSET,
|
2035
|
+
exponent_bits = Z_DOUBLE_EXPONENT_BITS,
|
2036
|
+
exponent_radix = Z_DOUBLE_EXPONENT_RADIX,
|
2037
|
+
sign_offset = Z_DOUBLE_SIGN_OFFSET,
|
2038
|
+
sign_bits = Z_DOUBLE_SIGN_BITS
|
2039
|
+
};
|
2040
|
+
enum { exponent_minimum = Z_DOUBLE_EXPONENT_MINIMUM,
|
2041
|
+
exponent_maximum = Z_DOUBLE_EXPONENT_MAXIMUM,
|
2042
|
+
exponent_10_minimum = Z_DOUBLE_EXPONENT_10_MINIMUM,
|
2043
|
+
exponent_10_maximum = Z_DOUBLE_EXPONENT_10_MAXIMUM
|
2044
|
+
};
|
2045
|
+
|
2046
|
+
static Z_CT(CPP11) zdouble epsilon () {return Z_DOUBLE_EPSILON;}
|
2047
|
+
static Z_CT(CPP11) zdouble minimum () {return Z_DOUBLE_MINIMUM;}
|
2048
|
+
static Z_CT(CPP11) zdouble maximum () {return Z_DOUBLE_MAXIMUM;}
|
2049
|
+
/* static Z_CT(CPP11) zdouble infinity() Z_NO_EXCEPTION {return Z_DOUBLE_INFINITY;}
|
2050
|
+
static Z_CT(CPP11) zdouble nan () Z_NO_EXCEPTION {return Z_DOUBLE_NAN;}*/
|
2051
|
+
|
2052
|
+
typedef zdouble type;
|
2053
|
+
typedef zdouble to_signed;
|
2054
|
+
};
|
2055
|
+
|
2056
|
+
# endif
|
2057
|
+
|
2058
|
+
# if Z_TRAIT_HAS(Type, is_ldouble)
|
2059
|
+
|
2060
|
+
struct LDouble : Real {
|
2061
|
+
enum {is_ldouble = true};
|
2062
|
+
|
2063
|
+
enum { value_type = Z_LDOUBLE_VALUE_TYPE,
|
2064
|
+
fixed_value_type = Z_LDOUBLE_FIXED_VALUE_TYPE,
|
2065
|
+
value_format = Z_LDOUBLE_VALUE_FORMAT
|
2066
|
+
};
|
2067
|
+
enum { bias = Z_LDOUBLE_BIAS,
|
2068
|
+
decimal_digits = Z_LDOUBLE_DECIMAL_DIGITS,
|
2069
|
+
significand_offset = Z_LDOUBLE_SIGNIFICAND_OFFSET,
|
2070
|
+
significand_bits = Z_LDOUBLE_SIGNIFICAND_BITS,
|
2071
|
+
significand_digits = Z_LDOUBLE_SIGNIFICAND_DIGITS,
|
2072
|
+
exponent_offset = Z_LDOUBLE_EXPONENT_OFFSET,
|
2073
|
+
exponent_bits = Z_LDOUBLE_EXPONENT_BITS,
|
2074
|
+
exponent_radix = Z_LDOUBLE_EXPONENT_RADIX,
|
2075
|
+
sign_offset = Z_LDOUBLE_SIGN_OFFSET,
|
2076
|
+
sign_bits = Z_LDOUBLE_SIGN_BITS
|
2077
|
+
};
|
2078
|
+
enum { exponent_minimum = Z_LDOUBLE_EXPONENT_MINIMUM,
|
2079
|
+
exponent_maximum = Z_LDOUBLE_EXPONENT_MAXIMUM,
|
2080
|
+
exponent_10_minimum = Z_LDOUBLE_EXPONENT_10_MINIMUM,
|
2081
|
+
exponent_10_maximum = Z_LDOUBLE_EXPONENT_10_MAXIMUM
|
2082
|
+
};
|
2083
|
+
|
2084
|
+
static Z_CT(CPP11) zldouble epsilon () {return Z_LDOUBLE_EPSILON;}
|
2085
|
+
static Z_CT(CPP11) zldouble minimum () {return Z_LDOUBLE_MINIMUM;}
|
2086
|
+
static Z_CT(CPP11) zldouble maximum () {return Z_LDOUBLE_MAXIMUM;}
|
2087
|
+
/* static Z_CT(CPP11) zldouble infinity() Z_NO_EXCEPTION {return Z_LDOUBLE_INFINITY;}
|
2088
|
+
static Z_CT(CPP11) zldouble nan () Z_NO_EXCEPTION {return Z_LDOUBLE_NAN;}*/
|
2089
|
+
|
2090
|
+
typedef zldouble type;
|
2091
|
+
typedef zldouble to_signed;
|
2092
|
+
};
|
2093
|
+
|
2094
|
+
# endif
|
2095
|
+
|
2096
|
+
# if Z_TRAIT_HAS(Type, is_boolean)
|
2097
|
+
|
2098
|
+
struct Boolean : Integral {
|
2099
|
+
enum {is_boolean = true};
|
2100
|
+
|
2101
|
+
typedef bool type;
|
2102
|
+
};
|
2103
|
+
|
2104
|
+
# endif
|
2105
|
+
|
2106
|
+
/*# if Z_TRAIT_HAS(Type, is_wchar)
|
2107
|
+
|
2108
|
+
struct WChar {
|
2109
|
+
enum {is_wchar = true};
|
2110
|
+
|
2111
|
+
typedef wchar_t type;
|
2112
|
+
};
|
2113
|
+
|
2114
|
+
# endif
|
2115
|
+
|
2116
|
+
# if Z_TRAIT_HAS(Type, is_char16)
|
2117
|
+
|
2118
|
+
struct Char16 {
|
2119
|
+
enum {is_wchar = true};
|
2120
|
+
|
2121
|
+
typedef char16_t type;
|
2122
|
+
};
|
2123
|
+
|
2124
|
+
# endif
|
2125
|
+
|
2126
|
+
# if Z_TRAIT_HAS(Type, is_char32)
|
2127
|
+
|
2128
|
+
struct Char32 {
|
2129
|
+
enum {is_wchar = true};
|
2130
|
+
|
2131
|
+
typedef char32_t type;
|
2132
|
+
};
|
2133
|
+
|
2134
|
+
# endif*/
|
2135
|
+
|
2136
|
+
# if Z_TRAIT_HAS(Type, is_null_pointer)
|
2137
|
+
|
2138
|
+
struct NullPointer : PointerLike {
|
2139
|
+
enum { is_fundamental = true,
|
2140
|
+
is_null_pointer = true
|
2141
|
+
};
|
2142
|
+
|
2143
|
+
typedef decltype(nullptr) type;
|
2144
|
+
};
|
2145
|
+
|
2146
|
+
# endif
|
2147
|
+
|
2148
|
+
template <zboolean E, class T> struct Array;
|
2149
|
+
|
2150
|
+
template <class T> struct Array<false, T> : Storable {
|
2151
|
+
enum {is_array = true};
|
2152
|
+
|
2153
|
+
typedef T element_type;
|
2154
|
+
};
|
2155
|
+
|
2156
|
+
template <class T> struct Array<true, T> : Array<false, T> {
|
2157
|
+
# if Z_TRAIT_HAS(Type, is_aggregate)
|
2158
|
+
enum {is_aggregate = true};
|
2159
|
+
# endif
|
2160
|
+
|
2161
|
+
# if Z_TRAIT_HAS(Type, is_default_constructible)
|
2162
|
+
enum {is_default_constructible = Helpers::IsDefaultConstructible<T, T>::value};
|
2163
|
+
# endif
|
2164
|
+
|
2165
|
+
# if Z_TRAIT_HAS(Type, is_literal)
|
2166
|
+
enum {is_literal = Z_COMPILER_TRAIT(TYPE_IS_LITERAL)(T)};
|
2167
|
+
# endif
|
2168
|
+
|
2169
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
2170
|
+
enum {is_pod = Z_COMPILER_TRAIT(TYPE_IS_POD)(T)};
|
2171
|
+
# endif
|
2172
|
+
|
2173
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_constructible)
|
2174
|
+
enum {is_trivially_copy_constructible = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE)(T)};
|
2175
|
+
# endif
|
2176
|
+
|
2177
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copyable)
|
2178
|
+
enum {is_trivially_copyable = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_COPYABLE)(T)};
|
2179
|
+
# endif
|
2180
|
+
|
2181
|
+
# if Z_TRAIT_HAS(Type, is_trivially_default_constructible)
|
2182
|
+
enum {is_trivially_default_constructible = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE)(T)};
|
2183
|
+
# endif
|
2184
|
+
|
2185
|
+
# if Z_TRAIT_HAS(Type, is_trivially_destructible)
|
2186
|
+
enum {is_trivially_destructible = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_DESTRUCTIBLE)(T)};
|
2187
|
+
# endif
|
2188
|
+
};
|
2189
|
+
|
2190
|
+
template <zboolean E, class T, zusize N> struct SizedArray : Array<E, T> {
|
2191
|
+
enum { is_empty = (N == 0),
|
2192
|
+
is_statically_allocatable = true
|
2193
|
+
};
|
2194
|
+
enum {element_count = N};
|
2195
|
+
|
2196
|
+
typedef T type[N];
|
2197
|
+
};
|
2198
|
+
|
2199
|
+
template <zboolean E, class T> struct FlexibleArray : Array<E, T> {
|
2200
|
+
enum { is_empty = true,
|
2201
|
+
is_flexible_array = true
|
2202
|
+
};
|
2203
|
+
|
2204
|
+
typedef T type[];
|
2205
|
+
};
|
2206
|
+
|
2207
|
+
template <class T> struct Pointer : PointerLike {
|
2208
|
+
enum {is_pointer = true};
|
2209
|
+
|
2210
|
+
typedef T* type;
|
2211
|
+
typedef T pointee_type;
|
2212
|
+
};
|
2213
|
+
|
2214
|
+
template <class T, class C, class M> struct MemberPointer : PointerLike {
|
2215
|
+
enum { is_member_pointer = true,
|
2216
|
+
is_pointer = true
|
2217
|
+
};
|
2218
|
+
|
2219
|
+
typedef T type;
|
2220
|
+
typedef C class_type;
|
2221
|
+
typedef M pointee_type;
|
2222
|
+
};
|
2223
|
+
|
2224
|
+
template <class T, class C, class M> struct DataMemberPointer : MemberPointer<T, C, M> {
|
2225
|
+
enum {is_data_member_pointer = true};
|
2226
|
+
|
2227
|
+
};
|
2228
|
+
|
2229
|
+
template <class T, class C, class M> struct MemberFunctionPointer : MemberPointer<T, C, M> {
|
2230
|
+
enum { is_callable = true,
|
2231
|
+
is_member_function_pointer = true
|
2232
|
+
};
|
2233
|
+
enum {pointer_level = 1};
|
2234
|
+
|
2235
|
+
typedef M to_function;
|
2236
|
+
};
|
2237
|
+
|
2238
|
+
template <class T> struct Reference : Simple {
|
2239
|
+
enum {is_reference = true};
|
2240
|
+
|
2241
|
+
typedef T referencee_type;
|
2242
|
+
};
|
2243
|
+
|
2244
|
+
template <class T> struct LValueReference : Reference<T> {
|
2245
|
+
enum {is_lvalue_reference = true};
|
2246
|
+
|
2247
|
+
typedef T& type;
|
2248
|
+
};
|
2249
|
+
|
2250
|
+
# if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
2251
|
+
|
2252
|
+
template <class T> struct RValueReference : Reference<T> {
|
2253
|
+
enum {is_rvalue_reference = true};
|
2254
|
+
|
2255
|
+
typedef T&& type;
|
2256
|
+
};
|
2257
|
+
|
2258
|
+
# endif
|
2259
|
+
|
2260
|
+
# if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
2261
|
+
|
2262
|
+
template <class R, class... P> struct Function : Valid {
|
2263
|
+
enum { is_callable = true,
|
2264
|
+
is_function = true
|
2265
|
+
};
|
2266
|
+
enum {arity = TypeCount<P...>::value};
|
2267
|
+
|
2268
|
+
typedef R type (P...);
|
2269
|
+
typedef R to_const (P...) const;
|
2270
|
+
typedef R to_const_volatile(P...) const volatile;
|
2271
|
+
typedef R to_volatile (P...) volatile;
|
2272
|
+
|
2273
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2274
|
+
typedef R to_const_lvalue (P...) const &;
|
2275
|
+
typedef R to_const_rvalue (P...) const &&;
|
2276
|
+
typedef R to_const_volatile_lvalue(P...) const volatile &;
|
2277
|
+
typedef R to_const_volatile_rvalue(P...) const volatile &&;
|
2278
|
+
typedef R to_lvalue (P...) &;
|
2279
|
+
typedef R to_rvalue (P...) &&;
|
2280
|
+
typedef R to_volatile_lvalue (P...) volatile &;
|
2281
|
+
typedef R to_volatile_rvalue (P...) volatile &&;
|
2282
|
+
# endif
|
2283
|
+
|
2284
|
+
typedef R return_type;
|
2285
|
+
|
2286
|
+
# if Z_TRAIT_HAS(Type, parameters)
|
2287
|
+
typedef TypeList<P...> parameters;
|
2288
|
+
# endif
|
2289
|
+
};
|
2290
|
+
|
2291
|
+
template <class R, class... P> struct VariadicFunction : Function<R, P...> {
|
2292
|
+
enum {is_variadic = true};
|
2293
|
+
|
2294
|
+
typedef R type (P..., ...);
|
2295
|
+
typedef R to_const (P..., ...) const;
|
2296
|
+
typedef R to_const_volatile(P..., ...) const volatile;
|
2297
|
+
typedef R to_volatile (P..., ...) volatile;
|
2298
|
+
|
2299
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2300
|
+
typedef R to_const_lvalue (P..., ...) const &;
|
2301
|
+
typedef R to_const_rvalue (P..., ...) const &&;
|
2302
|
+
typedef R to_const_volatile_lvalue(P..., ...) const volatile &;
|
2303
|
+
typedef R to_const_volatile_rvalue(P..., ...) const volatile &&;
|
2304
|
+
typedef R to_lvalue (P..., ...) &;
|
2305
|
+
typedef R to_rvalue (P..., ...) &&;
|
2306
|
+
typedef R to_volatile_lvalue (P..., ...) volatile &;
|
2307
|
+
typedef R to_volatile_rvalue (P..., ...) volatile &&;
|
2308
|
+
# endif
|
2309
|
+
};
|
2310
|
+
|
2311
|
+
# else
|
2312
|
+
|
2313
|
+
template <class R> struct FunctionWith0Parameters : Valid {
|
2314
|
+
enum { is_callable = true,
|
2315
|
+
is_function = true
|
2316
|
+
};
|
2317
|
+
enum {arity = 0};
|
2318
|
+
|
2319
|
+
typedef R type ();
|
2320
|
+
typedef R to_const () const;
|
2321
|
+
typedef R to_const_volatile() const volatile;
|
2322
|
+
typedef R to_volatile () volatile;
|
2323
|
+
|
2324
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2325
|
+
typedef R to_const_lvalue () const &;
|
2326
|
+
typedef R to_const_rvalue () const &&;
|
2327
|
+
typedef R to_const_volatile_lvalue() const volatile &;
|
2328
|
+
typedef R to_const_volatile_rvalue() const volatile &&;
|
2329
|
+
typedef R to_lvalue () &;
|
2330
|
+
typedef R to_rvalue () &&;
|
2331
|
+
typedef R to_volatile_lvalue () volatile &;
|
2332
|
+
typedef R to_volatile_rvalue () volatile &&;
|
2333
|
+
# endif
|
2334
|
+
|
2335
|
+
typedef R return_type;
|
2336
|
+
};
|
2337
|
+
|
2338
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2339
|
+
|
2340
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
2341
|
+
\
|
2342
|
+
template <class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> \
|
2343
|
+
struct FunctionWith##parameter_count##Parameters : Valid { \
|
2344
|
+
enum { is_callable = true, \
|
2345
|
+
is_function = true \
|
2346
|
+
}; \
|
2347
|
+
enum {arity = parameter_count}; \
|
2348
|
+
\
|
2349
|
+
typedef R type (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)); \
|
2350
|
+
typedef R to_const (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const; \
|
2351
|
+
typedef R to_const_lvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &; \
|
2352
|
+
typedef R to_const_rvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&; \
|
2353
|
+
typedef R to_const_volatile (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile; \
|
2354
|
+
typedef R to_const_volatile_lvalue(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &; \
|
2355
|
+
typedef R to_const_volatile_rvalue(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&; \
|
2356
|
+
typedef R to_lvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &; \
|
2357
|
+
typedef R to_rvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&; \
|
2358
|
+
typedef R to_volatile (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile; \
|
2359
|
+
typedef R to_volatile_lvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &; \
|
2360
|
+
typedef R to_volatile_rvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&; \
|
2361
|
+
typedef R return_type; \
|
2362
|
+
}; \
|
2363
|
+
\
|
2364
|
+
template <class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> \
|
2365
|
+
struct VariadicFunctionWith##parameter_count##Parameters \
|
2366
|
+
: FunctionWith##parameter_count##Parameters<R, Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)> { \
|
2367
|
+
enum {is_variadic = true}; \
|
2368
|
+
\
|
2369
|
+
typedef R type (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...); \
|
2370
|
+
typedef R to_const (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const; \
|
2371
|
+
typedef R to_const_lvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &; \
|
2372
|
+
typedef R to_const_rvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&; \
|
2373
|
+
typedef R to_const_volatile (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile; \
|
2374
|
+
typedef R to_const_volatile_lvalue(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &; \
|
2375
|
+
typedef R to_const_volatile_rvalue(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&; \
|
2376
|
+
typedef R to_lvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &; \
|
2377
|
+
typedef R to_rvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&; \
|
2378
|
+
typedef R to_volatile (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile; \
|
2379
|
+
typedef R to_volatile_lvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &; \
|
2380
|
+
typedef R to_volatile_rvalue (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&; \
|
2381
|
+
};
|
2382
|
+
|
2383
|
+
# else
|
2384
|
+
|
2385
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
2386
|
+
\
|
2387
|
+
template <class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> \
|
2388
|
+
struct FunctionWith##parameter_count##Parameters : Valid { \
|
2389
|
+
enum { is_callable = true, \
|
2390
|
+
is_function = true \
|
2391
|
+
}; \
|
2392
|
+
enum {arity = parameter_count + 1}; \
|
2393
|
+
\
|
2394
|
+
typedef R type (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)); \
|
2395
|
+
typedef R to_const (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const; \
|
2396
|
+
typedef R to_const_volatile(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile; \
|
2397
|
+
typedef R to_volatile (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile; \
|
2398
|
+
\
|
2399
|
+
typedef R return_type; \
|
2400
|
+
}; \
|
2401
|
+
\
|
2402
|
+
template <class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> \
|
2403
|
+
struct VariadicFunctionWith##parameter_count##Parameters \
|
2404
|
+
: FunctionWith##parameter_count##Parameters<R, Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)> { \
|
2405
|
+
enum {is_variadic = true}; \
|
2406
|
+
\
|
2407
|
+
typedef R type (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...); \
|
2408
|
+
typedef R to_const (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const; \
|
2409
|
+
typedef R to_const_volatile(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile; \
|
2410
|
+
typedef R to_volatile (Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile; \
|
2411
|
+
};
|
2412
|
+
|
2413
|
+
# endif
|
2414
|
+
|
2415
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
2416
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
2417
|
+
|
2418
|
+
# endif
|
2419
|
+
|
2420
|
+
enum { Enumeration,
|
2421
|
+
Structure,
|
2422
|
+
Union,
|
2423
|
+
ObjectiveCInstance
|
2424
|
+
};
|
2425
|
+
|
2426
|
+
template <zboolean E, zuint K, class T> struct Kind;
|
2427
|
+
|
2428
|
+
# if Z_TRAIT_HAS(Type, is_enumeration)
|
2429
|
+
|
2430
|
+
template <class T> struct Kind<false, Enumeration, T> : Simple {
|
2431
|
+
enum { is_enumeration = true,
|
2432
|
+
is_scalar = true
|
2433
|
+
};
|
2434
|
+
|
2435
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
2436
|
+
enum {is_pod = true};
|
2437
|
+
# endif
|
2438
|
+
|
2439
|
+
typedef T type;
|
2440
|
+
};
|
2441
|
+
|
2442
|
+
template <class T> struct Kind<true, Enumeration, T> : Kind<false, Enumeration, T> {
|
2443
|
+
# if Z_TRAIT_HAS(Type, underlying_type)
|
2444
|
+
typedef Z_COMPILER_TRAIT(TYPE_UNDERLYING_TYPE)(T) underlying_type;
|
2445
|
+
# endif
|
2446
|
+
};
|
2447
|
+
|
2448
|
+
# endif
|
2449
|
+
|
2450
|
+
template <zboolean E, class T> struct StructureOrUnion;
|
2451
|
+
|
2452
|
+
template <class T> struct StructureOrUnion<false, T> : Storable {
|
2453
|
+
enum {is_structure_or_union = true};
|
2454
|
+
|
2455
|
+
typedef T type;
|
2456
|
+
};
|
2457
|
+
|
2458
|
+
template <class T> struct StructureOrUnion<true, T> : StructureOrUnion<false, T> {
|
2459
|
+
|
2460
|
+
# if Z_TRAIT_HAS(Type, is_aggregate)
|
2461
|
+
enum {is_aggregate = Z_COMPILER_TRAIT(TYPE_IS_AGGREGATE)(T)};
|
2462
|
+
# endif
|
2463
|
+
|
2464
|
+
# if Z_TRAIT_HAS(Type, is_default_constructible)
|
2465
|
+
enum {is_default_constructible = Helpers::IsDefaultConstructible<T, T>::value};
|
2466
|
+
# endif
|
2467
|
+
|
2468
|
+
# if Z_TRAIT_HAS(Type, is_final)
|
2469
|
+
enum {is_final = Z_COMPILER_TRAIT(TYPE_IS_FINAL)(T)};
|
2470
|
+
# endif
|
2471
|
+
|
2472
|
+
# if Z_TRAIT_HAS(Type, is_literal)
|
2473
|
+
enum {is_literal = Z_COMPILER_TRAIT(TYPE_IS_LITERAL)(T)};
|
2474
|
+
# endif
|
2475
|
+
|
2476
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
2477
|
+
enum {is_pod = Z_COMPILER_TRAIT(TYPE_IS_POD)(T)};
|
2478
|
+
# endif
|
2479
|
+
|
2480
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_assignable)
|
2481
|
+
enum {is_trivially_copy_assignable = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_COPY_ASSIGNABLE)(T)};
|
2482
|
+
# endif
|
2483
|
+
|
2484
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_constructible)
|
2485
|
+
enum {is_trivially_copy_constructible = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE)(T)};
|
2486
|
+
# endif
|
2487
|
+
|
2488
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copyable)
|
2489
|
+
enum {is_trivially_copyable = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_COPYABLE)(T)};
|
2490
|
+
# endif
|
2491
|
+
|
2492
|
+
# if Z_TRAIT_HAS(Type, is_trivially_default_constructible)
|
2493
|
+
enum {is_trivially_default_constructible = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE)(T)};
|
2494
|
+
# endif
|
2495
|
+
|
2496
|
+
# if Z_TRAIT_HAS(Type, is_trivially_destructible)
|
2497
|
+
enum {is_trivially_destructible = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_DESTRUCTIBLE)(T)};
|
2498
|
+
# endif
|
2499
|
+
};
|
2500
|
+
|
2501
|
+
template <zboolean E, class T> struct MaybeTemplate : StructureOrUnion<E, T> {};
|
2502
|
+
|
2503
|
+
# if Z_TRAIT_HAS(Type, is_template)
|
2504
|
+
|
2505
|
+
template <zboolean E, template <class...> class T, class... A> struct MaybeTemplate<E, T<A...> > : StructureOrUnion<E, T<A...> > {
|
2506
|
+
enum {is_template = true};
|
2507
|
+
enum {arity = TypeCount<A...>::value};
|
2508
|
+
|
2509
|
+
typedef TypeList<A...> parameters;
|
2510
|
+
};
|
2511
|
+
|
2512
|
+
# endif
|
2513
|
+
|
2514
|
+
template <class T> class Kind<false, Structure, T> : public MaybeTemplate<false, T> {
|
2515
|
+
public:
|
2516
|
+
enum { is_class = true,
|
2517
|
+
is_structure = true
|
2518
|
+
};
|
2519
|
+
};
|
2520
|
+
|
2521
|
+
template <class T> class Kind<true, Structure, T> : public MaybeTemplate<true, T> {
|
2522
|
+
public:
|
2523
|
+
enum { is_class = true,
|
2524
|
+
is_structure = true
|
2525
|
+
};
|
2526
|
+
|
2527
|
+
# if Z_TRAIT_HAS(Type, has_virtual_destructor)
|
2528
|
+
enum {has_virtual_destructor = Z_COMPILER_TRAIT(TYPE_HAS_VIRTUAL_DESTRUCTOR)(T)};
|
2529
|
+
# endif
|
2530
|
+
|
2531
|
+
# if Z_TRAIT_HAS(Type, is_abstract)
|
2532
|
+
enum {is_abstract = Z_COMPILER_TRAIT(TYPE_IS_ABSTRACT)(T)};
|
2533
|
+
# endif
|
2534
|
+
|
2535
|
+
# if Z_COMPILER_HAS_TRAIT(TYPE_IS_EMPTY)
|
2536
|
+
enum {is_empty = Z_COMPILER_TRAIT(TYPE_IS_EMPTY)(T)};
|
2537
|
+
# else
|
2538
|
+
private:
|
2539
|
+
struct Dummy {zsint dummy;};
|
2540
|
+
struct Z_EBCO EmptyTest : T {zsint dummy;};
|
2541
|
+
|
2542
|
+
public:
|
2543
|
+
enum {is_empty = (sizeof(EmptyTest) == sizeof(Dummy))};
|
2544
|
+
# endif
|
2545
|
+
|
2546
|
+
# if Z_TRAIT_HAS(Type, is_interface_class)
|
2547
|
+
enum {is_interface_class = Z_COMPILER_TRAIT(TYPE_IS_INTERFACE_CLASS)(T)};
|
2548
|
+
# endif
|
2549
|
+
|
2550
|
+
# if Z_TRAIT_HAS(Type, is_polymorphic)
|
2551
|
+
enum {is_polymorphic = Z_COMPILER_TRAIT(TYPE_IS_POLYMORPHIC)(T)};
|
2552
|
+
# endif
|
2553
|
+
};
|
2554
|
+
|
2555
|
+
# if Z_TRAIT_HAS(Type, is_union)
|
2556
|
+
|
2557
|
+
template <zboolean E, class T> struct Kind<E, Union, T> : MaybeTemplate<E, T> {
|
2558
|
+
enum { is_statically_allocatable = true,
|
2559
|
+
is_union = true
|
2560
|
+
};
|
2561
|
+
};
|
2562
|
+
|
2563
|
+
# endif
|
2564
|
+
|
2565
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
2566
|
+
|
2567
|
+
struct ObjectiveCObject : Valid {
|
2568
|
+
enum {is_objective_c_object = true};
|
2569
|
+
|
2570
|
+
typedef typename Pointer<id>::remove_pointer type;
|
2571
|
+
};
|
2572
|
+
|
2573
|
+
struct ObjectiveCClass : ObjectiveCObject {
|
2574
|
+
enum {is_objective_c_class = true};
|
2575
|
+
|
2576
|
+
typedef typename Pointer<Class>::remove_pointer type;
|
2577
|
+
};
|
2578
|
+
|
2579
|
+
# if Z_TRAIT_HAS(Type, is_objective_c_instance)
|
2580
|
+
|
2581
|
+
template <zboolean E, class T> struct Kind<E, ObjectiveCInstance, T> : ObjectiveCObject {
|
2582
|
+
enum {is_objective_c_instance = true};
|
2583
|
+
|
2584
|
+
typedef T type;
|
2585
|
+
};
|
2586
|
+
|
2587
|
+
# endif
|
2588
|
+
|
2589
|
+
# endif
|
2590
|
+
}}}}
|
2591
|
+
|
2592
|
+
namespace Zeta {namespace Detail {namespace Type {namespace Mixins {
|
2593
|
+
|
2594
|
+
// MARK: - Mixins: Qualifiers (generic)
|
2595
|
+
|
2596
|
+
template <class C> struct Unqualified : C {
|
2597
|
+
typedef const typename C::type add_const;
|
2598
|
+
typedef const volatile typename C::type add_const_volatile;
|
2599
|
+
typedef volatile typename C::type add_volatile;
|
2600
|
+
typedef typename C::type remove_const;
|
2601
|
+
typedef typename C::type remove_const_volatile;
|
2602
|
+
typedef typename C::type remove_volatile;
|
2603
|
+
typedef const typename C::type to_const;
|
2604
|
+
typedef const volatile typename C::type to_const_volatile;
|
2605
|
+
typedef volatile typename C::type to_volatile;
|
2606
|
+
typedef typename C::type to_unqualified;
|
2607
|
+
};
|
2608
|
+
|
2609
|
+
template <class C> struct Qualified : C {
|
2610
|
+
enum {is_qualified = true};
|
2611
|
+
};
|
2612
|
+
|
2613
|
+
template <class C> struct Const : Qualified<C> {
|
2614
|
+
enum {is_const = true};
|
2615
|
+
|
2616
|
+
typedef typename C::to_const type;
|
2617
|
+
typedef typename C::to_const_volatile add_volatile;
|
2618
|
+
typedef typename C::to_const remove_volatile;
|
2619
|
+
};
|
2620
|
+
|
2621
|
+
template <class C> struct Volatile : Qualified<C> {
|
2622
|
+
enum {is_volatile = true};
|
2623
|
+
|
2624
|
+
typedef typename C::to_volatile type;
|
2625
|
+
typedef typename C::to_const_volatile add_const;
|
2626
|
+
typedef typename C::to_volatile remove_const;
|
2627
|
+
};
|
2628
|
+
|
2629
|
+
template <class C> struct ConstVolatile : Qualified<C> {
|
2630
|
+
enum { is_const = true,
|
2631
|
+
is_const_volatile = true,
|
2632
|
+
is_volatile = true
|
2633
|
+
};
|
2634
|
+
|
2635
|
+
typedef typename C::to_const_volatile type;
|
2636
|
+
typedef typename C::to_const_volatile add_const;
|
2637
|
+
typedef typename C::to_const_volatile add_volatile;
|
2638
|
+
typedef typename C::to_volatile remove_const;
|
2639
|
+
typedef typename C::to_const remove_volatile;
|
2640
|
+
};
|
2641
|
+
|
2642
|
+
// MARK: - Mixins: Qualifiers (signed or unsigned)
|
2643
|
+
|
2644
|
+
template <class C> struct ConstInteger : Const<C> {
|
2645
|
+
typedef const typename C::to_unsigned to_unsigned;
|
2646
|
+
};
|
2647
|
+
|
2648
|
+
template <class C> struct VolatileInteger : Volatile<C> {
|
2649
|
+
typedef volatile typename C::to_unsigned to_unsigned;
|
2650
|
+
};
|
2651
|
+
|
2652
|
+
template <class C> struct ConstVolatileInteger : ConstVolatile<C> {
|
2653
|
+
typedef const volatile typename C::to_unsigned to_unsigned;
|
2654
|
+
};
|
2655
|
+
|
2656
|
+
template <class C> struct ConstSignedOrUnsigned : TernaryType<C::is_real, Const<C>, ConstInteger<C> >::type {
|
2657
|
+
typedef const typename C::to_signed to_signed;
|
2658
|
+
};
|
2659
|
+
|
2660
|
+
template <class C> struct VolatileSignedOrUnsigned : TernaryType<C::is_real, Volatile<C>, VolatileInteger<C> >::type {
|
2661
|
+
typedef volatile typename C::to_signed to_signed;
|
2662
|
+
};
|
2663
|
+
|
2664
|
+
template <class C> struct ConstVolatileSignedOrUnsigned : TernaryType<C::is_real, ConstVolatile<C>, ConstVolatileInteger<C> >::type {
|
2665
|
+
typedef const volatile typename C::to_signed to_signed;
|
2666
|
+
};
|
2667
|
+
|
2668
|
+
// MARK: - Mixins: Qualifiers (array)
|
2669
|
+
|
2670
|
+
template <class C> struct ConstArray : Const<C> {
|
2671
|
+
typedef const typename C::element_type element_type;
|
2672
|
+
};
|
2673
|
+
|
2674
|
+
template <class C> struct VolatileArray : Volatile<C> {
|
2675
|
+
typedef volatile typename C::element_type element_type;
|
2676
|
+
};
|
2677
|
+
|
2678
|
+
template <class C> struct ConstVolatileArray : ConstVolatile<C> {
|
2679
|
+
typedef const volatile typename C::element_type element_type;
|
2680
|
+
};
|
2681
|
+
|
2682
|
+
// MARK: - Mixins: Qualifiers (function)
|
2683
|
+
|
2684
|
+
template <class C> struct UnqualifiedFunction : C {
|
2685
|
+
typedef typename C::to_const add_const;
|
2686
|
+
typedef typename C::to_const_volatile add_const_volatile;
|
2687
|
+
typedef typename C::to_volatile add_volatile;
|
2688
|
+
typedef typename C::type remove_const;
|
2689
|
+
typedef typename C::type remove_const_volatile;
|
2690
|
+
typedef typename C::type remove_volatile;
|
2691
|
+
typedef typename C::type to_unqualified;
|
2692
|
+
|
2693
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2694
|
+
typedef typename C::to_const_lvalue add_const_lvalue;
|
2695
|
+
typedef typename C::to_const_rvalue add_const_rvalue;
|
2696
|
+
typedef typename C::to_const_volatile_lvalue add_const_volatile_lvalue;
|
2697
|
+
typedef typename C::to_const_volatile_rvalue add_const_volatile_rvalue;
|
2698
|
+
typedef typename C::to_lvalue add_lvalue;
|
2699
|
+
typedef typename C::to_rvalue add_rvalue;
|
2700
|
+
typedef typename C::to_volatile_lvalue add_volatile_lvalue;
|
2701
|
+
typedef typename C::to_volatile_rvalue add_volatile_rvalue;
|
2702
|
+
typedef typename C::type remove_const_this;
|
2703
|
+
typedef typename C::type remove_const_volatile_this;
|
2704
|
+
typedef typename C::type remove_this;
|
2705
|
+
typedef typename C::type remove_volatile_this;
|
2706
|
+
# endif
|
2707
|
+
};
|
2708
|
+
|
2709
|
+
template <class C> struct QualifiedFunction : C {
|
2710
|
+
enum {is_qualified = true};
|
2711
|
+
};
|
2712
|
+
|
2713
|
+
template <class C> struct ConstFunction : QualifiedFunction<C> {
|
2714
|
+
enum {is_const = true};
|
2715
|
+
|
2716
|
+
typedef typename C::to_const type;
|
2717
|
+
typedef typename C::to_const_volatile add_volatile;
|
2718
|
+
typedef typename C::to_const remove_volatile;
|
2719
|
+
|
2720
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2721
|
+
typedef typename C::to_const_lvalue add_lvalue;
|
2722
|
+
typedef typename C::to_const_rvalue add_rvalue;
|
2723
|
+
typedef typename C::to_const_volatile_lvalue add_volatile_lvalue;
|
2724
|
+
typedef typename C::to_const_volatile_rvalue add_volatile_rvalue;
|
2725
|
+
typedef typename C::to_const remove_this;
|
2726
|
+
typedef typename C::to_const remove_volatile_this;
|
2727
|
+
# endif
|
2728
|
+
};
|
2729
|
+
|
2730
|
+
template <class C> struct VolatileFunction : QualifiedFunction<C> {
|
2731
|
+
enum {is_volatile = true};
|
2732
|
+
|
2733
|
+
typedef typename C::to_volatile type;
|
2734
|
+
typedef typename C::to_const_volatile add_const;
|
2735
|
+
typedef typename C::to_volatile remove_const;
|
2736
|
+
|
2737
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2738
|
+
typedef typename C::to_const_volatile_lvalue add_const_lvalue;
|
2739
|
+
typedef typename C::to_const_volatile_rvalue add_const_rvalue;
|
2740
|
+
typedef typename C::to_volatile_lvalue add_lvalue;
|
2741
|
+
typedef typename C::to_volatile_rvalue add_rvalue;
|
2742
|
+
typedef typename C::to_volatile remove_const_this;
|
2743
|
+
typedef typename C::to_volatile remove_this;
|
2744
|
+
# endif
|
2745
|
+
};
|
2746
|
+
|
2747
|
+
template <class C> struct ConstVolatileFunction : QualifiedFunction<C> {
|
2748
|
+
enum { is_const = true,
|
2749
|
+
is_const_volatile = true,
|
2750
|
+
is_volatile = true
|
2751
|
+
};
|
2752
|
+
|
2753
|
+
typedef typename C::to_const_volatile type;
|
2754
|
+
typedef typename C::to_const_volatile add_const;
|
2755
|
+
typedef typename C::to_const_volatile add_volatile;
|
2756
|
+
typedef typename C::to_volatile remove_const;
|
2757
|
+
typedef typename C::to_const remove_volatile;
|
2758
|
+
|
2759
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2760
|
+
typedef typename C::to_const_volatile_lvalue add_const_lvalue;
|
2761
|
+
typedef typename C::to_const_volatile_rvalue add_const_rvalue;
|
2762
|
+
typedef typename C::to_const_volatile_lvalue add_lvalue;
|
2763
|
+
typedef typename C::to_const_volatile_rvalue add_rvalue;
|
2764
|
+
typedef typename C::to_const_volatile_lvalue add_volatile_lvalue;
|
2765
|
+
typedef typename C::to_const_volatile_rvalue add_volatile_rvalue;
|
2766
|
+
typedef typename C::to_volatile remove_const_this;
|
2767
|
+
typedef typename C::to_const_volatile remove_this;
|
2768
|
+
typedef typename C::to_const remove_volatile_this;
|
2769
|
+
# endif
|
2770
|
+
};
|
2771
|
+
|
2772
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
2773
|
+
|
2774
|
+
template <class C> struct LValueFunction : QualifiedFunction<C> {
|
2775
|
+
enum {is_lvalue = true};
|
2776
|
+
|
2777
|
+
typedef typename C::to_lvalue type;
|
2778
|
+
typedef typename C::to_const_lvalue add_const;
|
2779
|
+
typedef typename C::to_const_volatile_lvalue add_const_volatile;
|
2780
|
+
typedef typename C::to_volatile_lvalue add_volatile;
|
2781
|
+
typedef typename C::to_lvalue remove_const;
|
2782
|
+
typedef typename C::to_lvalue remove_const_volatile;
|
2783
|
+
typedef typename C::to_lvalue remove_volatile;
|
2784
|
+
};
|
2785
|
+
|
2786
|
+
template <class C> struct RValueFunction : QualifiedFunction<C> {
|
2787
|
+
enum {is_rvalue = true};
|
2788
|
+
|
2789
|
+
typedef typename C::to_rvalue type;
|
2790
|
+
typedef typename C::to_const_rvalue add_const;
|
2791
|
+
typedef typename C::to_const_volatile_rvalue add_const_volatile;
|
2792
|
+
typedef typename C::to_volatile_rvalue add_volatile;
|
2793
|
+
typedef typename C::to_rvalue remove_const;
|
2794
|
+
typedef typename C::to_rvalue remove_const_volatile;
|
2795
|
+
typedef typename C::to_rvalue remove_volatile;
|
2796
|
+
};
|
2797
|
+
|
2798
|
+
template <class C> struct ConstLValueFunction : QualifiedFunction<C> {
|
2799
|
+
enum { is_const = true,
|
2800
|
+
is_const_lvalue = true,
|
2801
|
+
is_lvalue = true
|
2802
|
+
};
|
2803
|
+
|
2804
|
+
typedef typename C::to_const_lvalue type;
|
2805
|
+
typedef typename C::to_const_lvalue add_const;
|
2806
|
+
typedef typename C::to_const_volatile_lvalue add_const_volatile;
|
2807
|
+
typedef typename C::to_const_lvalue add_lvalue;
|
2808
|
+
typedef typename C::to_const_rvalue add_rvalue;
|
2809
|
+
typedef typename C::to_const_volatile_lvalue add_volatile;
|
2810
|
+
typedef typename C::to_const_volatile_lvalue add_volatile_lvalue;
|
2811
|
+
typedef typename C::to_const_volatile_rvalue add_volatile_rvalue;
|
2812
|
+
typedef typename C::to_lvalue remove_const;
|
2813
|
+
typedef typename C::to_lvalue remove_const_volatile;
|
2814
|
+
typedef typename C::to_const remove_this;
|
2815
|
+
typedef typename C::to_const_lvalue remove_volatile;
|
2816
|
+
typedef typename C::to_const remove_volatile_this;
|
2817
|
+
};
|
2818
|
+
|
2819
|
+
template <class C> struct ConstRValueFunction : QualifiedFunction<C> {
|
2820
|
+
enum { is_const = true,
|
2821
|
+
is_const_rvalue = true,
|
2822
|
+
is_rvalue = true
|
2823
|
+
};
|
2824
|
+
|
2825
|
+
typedef typename C::to_const_rvalue type;
|
2826
|
+
typedef typename C::to_const_rvalue add_const;
|
2827
|
+
typedef typename C::to_const_volatile_rvalue add_const_volatile;
|
2828
|
+
typedef typename C::to_const_lvalue add_lvalue;
|
2829
|
+
typedef typename C::to_const_rvalue add_rvalue;
|
2830
|
+
typedef typename C::to_const_volatile_rvalue add_volatile;
|
2831
|
+
typedef typename C::to_const_volatile_lvalue add_volatile_lvalue;
|
2832
|
+
typedef typename C::to_const_volatile_rvalue add_volatile_rvalue;
|
2833
|
+
typedef typename C::to_rvalue remove_const;
|
2834
|
+
typedef typename C::to_rvalue remove_const_volatile;
|
2835
|
+
typedef typename C::to_const remove_this;
|
2836
|
+
typedef typename C::to_const_rvalue remove_volatile;
|
2837
|
+
typedef typename C::to_const remove_volatile_this;
|
2838
|
+
};
|
2839
|
+
|
2840
|
+
template <class C> struct VolatileLValueFunction : QualifiedFunction<C> {
|
2841
|
+
enum { is_lvalue = true,
|
2842
|
+
is_volatile = true,
|
2843
|
+
is_volatile_lvalue = true
|
2844
|
+
};
|
2845
|
+
|
2846
|
+
typedef typename C::to_volatile_lvalue type;
|
2847
|
+
typedef typename C::to_const_volatile_lvalue add_const;
|
2848
|
+
typedef typename C::to_const_volatile_lvalue add_const_lvalue;
|
2849
|
+
typedef typename C::to_const_volatile_rvalue add_const_rvalue;
|
2850
|
+
typedef typename C::to_const_volatile_lvalue add_const_volatile;
|
2851
|
+
typedef typename C::to_volatile_lvalue add_lvalue;
|
2852
|
+
typedef typename C::to_volatile_rvalue add_rvalue;
|
2853
|
+
typedef typename C::to_volatile_lvalue add_volatile;
|
2854
|
+
typedef typename C::to_volatile_lvalue remove_const;
|
2855
|
+
typedef typename C::to_volatile remove_const_this;
|
2856
|
+
typedef typename C::to_lvalue remove_const_volatile;
|
2857
|
+
typedef typename C::to_volatile remove_this;
|
2858
|
+
typedef typename C::to_lvalue remove_volatile;
|
2859
|
+
};
|
2860
|
+
|
2861
|
+
template <class C> struct VolatileRValueFunction : QualifiedFunction<C> {
|
2862
|
+
enum { is_rvalue = true,
|
2863
|
+
is_volatile = true,
|
2864
|
+
is_volatile_rvalue = true
|
2865
|
+
};
|
2866
|
+
|
2867
|
+
typedef typename C::to_volatile_rvalue type;
|
2868
|
+
typedef typename C::to_const_volatile_rvalue add_const;
|
2869
|
+
typedef typename C::to_const_volatile_lvalue add_const_lvalue;
|
2870
|
+
typedef typename C::to_const_volatile_rvalue add_const_rvalue;
|
2871
|
+
typedef typename C::to_const_volatile_rvalue add_const_volatile;
|
2872
|
+
typedef typename C::to_volatile_lvalue add_lvalue;
|
2873
|
+
typedef typename C::to_volatile_rvalue add_rvalue;
|
2874
|
+
typedef typename C::to_volatile_rvalue add_volatile;
|
2875
|
+
typedef typename C::to_volatile_rvalue remove_const;
|
2876
|
+
typedef typename C::to_volatile remove_const_this;
|
2877
|
+
typedef typename C::to_rvalue remove_const_volatile;
|
2878
|
+
typedef typename C::to_volatile remove_this;
|
2879
|
+
typedef typename C::to_rvalue remove_volatile;
|
2880
|
+
};
|
2881
|
+
|
2882
|
+
template <class C> struct ConstVolatileLValueFunction : QualifiedFunction<C> {
|
2883
|
+
enum { is_const = true,
|
2884
|
+
is_const_lvalue = true,
|
2885
|
+
is_const_volatile = true,
|
2886
|
+
is_const_volatile_lvalue = true,
|
2887
|
+
is_lvalue = true,
|
2888
|
+
is_volatile = true,
|
2889
|
+
is_volatile_lvalue = true
|
2890
|
+
};
|
2891
|
+
|
2892
|
+
typedef typename C::to_const_volatile_lvalue type;
|
2893
|
+
typedef typename C::to_const_volatile_lvalue add_const;
|
2894
|
+
typedef typename C::to_const_volatile_lvalue add_const_lvalue;
|
2895
|
+
typedef typename C::to_const_volatile_rvalue add_const_rvalue;
|
2896
|
+
typedef typename C::to_const_volatile_lvalue add_const_volatile;
|
2897
|
+
typedef typename C::to_const_volatile_lvalue add_lvalue;
|
2898
|
+
typedef typename C::to_const_volatile_rvalue add_rvalue;
|
2899
|
+
typedef typename C::to_const_volatile_lvalue add_volatile;
|
2900
|
+
typedef typename C::to_const_volatile_lvalue add_volatile_lvalue;
|
2901
|
+
typedef typename C::to_const_volatile_rvalue add_volatile_rvalue;
|
2902
|
+
typedef typename C::to_volatile_lvalue remove_const;
|
2903
|
+
typedef typename C::to_volatile remove_const_this;
|
2904
|
+
typedef typename C::to_lvalue remove_const_volatile;
|
2905
|
+
typedef typename C::to_const_volatile remove_this;
|
2906
|
+
typedef typename C::to_const_lvalue remove_volatile;
|
2907
|
+
typedef typename C::to_const remove_volatile_this;
|
2908
|
+
};
|
2909
|
+
|
2910
|
+
template <class C> struct ConstVolatileRValueFunction : QualifiedFunction<C> {
|
2911
|
+
enum { is_const = true,
|
2912
|
+
is_const_rvalue = true,
|
2913
|
+
is_const_volatile = true,
|
2914
|
+
is_const_volatile_rvalue = true,
|
2915
|
+
is_rvalue = true,
|
2916
|
+
is_volatile = true,
|
2917
|
+
is_volatile_rvalue = true
|
2918
|
+
};
|
2919
|
+
|
2920
|
+
typedef typename C::to_const_volatile_rvalue type;
|
2921
|
+
typedef typename C::to_const_volatile_rvalue add_const;
|
2922
|
+
typedef typename C::to_const_volatile_lvalue add_const_lvalue;
|
2923
|
+
typedef typename C::to_const_volatile_rvalue add_const_rvalue;
|
2924
|
+
typedef typename C::to_const_volatile_rvalue add_const_volatile;
|
2925
|
+
typedef typename C::to_const_volatile_lvalue add_lvalue;
|
2926
|
+
typedef typename C::to_const_volatile_rvalue add_rvalue;
|
2927
|
+
typedef typename C::to_const_volatile_rvalue add_volatile;
|
2928
|
+
typedef typename C::to_const_volatile_lvalue add_volatile_lvalue;
|
2929
|
+
typedef typename C::to_const_volatile_rvalue add_volatile_rvalue;
|
2930
|
+
typedef typename C::to_volatile_rvalue remove_const;
|
2931
|
+
typedef typename C::to_volatile remove_const_this;
|
2932
|
+
typedef typename C::to_rvalue remove_const_volatile;
|
2933
|
+
typedef typename C::to_const_volatile remove_this;
|
2934
|
+
typedef typename C::to_const_rvalue remove_volatile;
|
2935
|
+
typedef typename C::to_const remove_volatile_this;
|
2936
|
+
};
|
2937
|
+
|
2938
|
+
# endif
|
2939
|
+
|
2940
|
+
// MARK: - Mixins: Kind
|
2941
|
+
|
2942
|
+
template <class C> struct Virtual : C {
|
2943
|
+
typedef typename C::type remove_pointer;
|
2944
|
+
typedef typename C::type remove_reference;
|
2945
|
+
};
|
2946
|
+
|
2947
|
+
template <class C> struct Storable : Virtual<C> {
|
2948
|
+
Z_DEFINE_STRICT_STRUCTURE (typename C::type value; ) to_wrap;
|
2949
|
+
Z_DEFINE_STRICT_STRUCTURE (UInt8 data[sizeof(to_wrap)];) to_opaque;
|
2950
|
+
|
2951
|
+
enum { size = C::is_empty ? 0 : sizeof(to_wrap),
|
2952
|
+
bits = C::is_empty ? 0 : sizeof(to_wrap) * 8
|
2953
|
+
};
|
2954
|
+
};
|
2955
|
+
|
2956
|
+
template <class C> struct Convertible : C {
|
2957
|
+
typedef typename C::type& add_lvalue_reference;
|
2958
|
+
typedef typename C::type* add_pointer;
|
2959
|
+
typedef typename C::type& to_lvalue_reference;
|
2960
|
+
typedef typename C::type* to_pointer;
|
2961
|
+
|
2962
|
+
# if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
2963
|
+
typedef typename C::type&& add_rvalue_reference;
|
2964
|
+
typedef typename C::type&& to_rvalue_reference;
|
2965
|
+
# endif
|
2966
|
+
};
|
2967
|
+
|
2968
|
+
enum { Void,
|
2969
|
+
Function,
|
2970
|
+
InconvertibleFunction,
|
2971
|
+
ConvertibleFunction,
|
2972
|
+
Value,
|
2973
|
+
VoidPointer,
|
2974
|
+
Pointer,
|
2975
|
+
MemberFunctionPointer,
|
2976
|
+
Reference,
|
2977
|
+
ObjectiveCObject
|
2978
|
+
};
|
2979
|
+
|
2980
|
+
template <zuint K, class C> struct Kind;
|
2981
|
+
|
2982
|
+
// MARK: - Mixins: Kind (virtual)
|
2983
|
+
|
2984
|
+
template <class C> struct Kind<Void, C> : Virtual<C> {
|
2985
|
+
typedef typename C::type* add_pointer;
|
2986
|
+
typedef typename C::type* to_pointer;
|
2987
|
+
};
|
2988
|
+
|
2989
|
+
template <class C> struct Kind<InconvertibleFunction, C> : Virtual<C> {
|
2990
|
+
typedef typename C::type to_function;
|
2991
|
+
};
|
2992
|
+
|
2993
|
+
template <class C> struct Kind<ConvertibleFunction, C> : Kind<InconvertibleFunction, Convertible<C> > {};
|
2994
|
+
|
2995
|
+
// MARK: - Mixins: Kind (storable)
|
2996
|
+
|
2997
|
+
template <class C> struct Kind<Value, C> : Storable<Convertible<C> > {};
|
2998
|
+
|
2999
|
+
template <class C> struct Kind<VoidPointer, C> : Storable<C> {
|
3000
|
+
typedef typename C::type& add_lvalue_reference;
|
3001
|
+
typedef typename C::type* add_pointer;
|
3002
|
+
typedef typename C::pointee_type remove_pointer;
|
3003
|
+
typedef typename C::type to_pointer;
|
3004
|
+
|
3005
|
+
# if Z_TRAIT_HAS(Type, add_rvalue_reference)
|
3006
|
+
typedef typename C::type&& add_rvalue_reference;
|
3007
|
+
# endif
|
3008
|
+
};
|
3009
|
+
|
3010
|
+
template <class C> struct Kind<Pointer, C> : Kind<VoidPointer, C> {
|
3011
|
+
typedef typename C::pointee_type& to_lvalue_reference;
|
3012
|
+
|
3013
|
+
# if Z_TRAIT_HAS(Type, to_rvalue_reference)
|
3014
|
+
typedef typename C::pointee_type&& to_rvalue_reference;
|
3015
|
+
# endif
|
3016
|
+
};
|
3017
|
+
|
3018
|
+
template <class C> struct Kind<MemberFunctionPointer, C> : Storable<C> {
|
3019
|
+
typedef typename C::pointee_type to_function;
|
3020
|
+
};
|
3021
|
+
|
3022
|
+
template <class C> struct Kind<Reference, C> : Storable<C> {
|
3023
|
+
typedef NaT add_const;
|
3024
|
+
typedef NaT add_const_volatile;
|
3025
|
+
typedef NaT add_volatile;
|
3026
|
+
typedef typename C::type remove_pointer;
|
3027
|
+
typedef typename C::referencee_type remove_reference;
|
3028
|
+
typedef NaT to_const;
|
3029
|
+
typedef NaT to_const_volatile;
|
3030
|
+
typedef typename C::referencee_type& to_lvalue_reference;
|
3031
|
+
typedef typename C::referencee_type* to_pointer;
|
3032
|
+
typedef NaT to_volatile;
|
3033
|
+
|
3034
|
+
# if Z_TRAIT_HAS(Type, to_rvalue_reference)
|
3035
|
+
typedef typename C::referencee_type&& to_rvalue_reference;
|
3036
|
+
# endif
|
3037
|
+
};
|
3038
|
+
|
3039
|
+
// MARK: - Mixins: Objective-C objects
|
3040
|
+
|
3041
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
3042
|
+
template <class C> struct Kind<ObjectiveCObject, C> : Convertible<C> {};
|
3043
|
+
# endif
|
3044
|
+
}}}}
|
3045
|
+
|
3046
|
+
namespace Zeta {namespace Detail {namespace Type {
|
3047
|
+
|
3048
|
+
// MARK: - Specializations: Enumerations, structures, unions and Objective-C instances
|
3049
|
+
|
3050
|
+
template <class T> struct Ambiguous {
|
3051
|
+
|
3052
|
+
enum { structure_detected =
|
3053
|
+
# if Z_COMPILER_HAS_TRAIT(TYPE_IS_CLASS)
|
3054
|
+
Z_COMPILER_TRAIT(TYPE_IS_CLASS)(T)
|
3055
|
+
# else
|
3056
|
+
false
|
3057
|
+
# endif
|
3058
|
+
};
|
3059
|
+
|
3060
|
+
enum { union_detected =
|
3061
|
+
# if Z_COMPILER_HAS_TRAIT(TYPE_IS_UNION)
|
3062
|
+
Z_COMPILER_TRAIT(TYPE_IS_UNION)(T)
|
3063
|
+
# else
|
3064
|
+
false
|
3065
|
+
# endif
|
3066
|
+
};
|
3067
|
+
|
3068
|
+
enum { structure_or_union_detected = structure_detected || union_detected ||
|
3069
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
3070
|
+
Helpers::IsStructureOrUnion<T, true>::value
|
3071
|
+
# else
|
3072
|
+
false
|
3073
|
+
# endif
|
3074
|
+
};
|
3075
|
+
|
3076
|
+
enum { enumeration_detected =
|
3077
|
+
# if Z_COMPILER_HAS_TRAIT(TYPE_IS_ENUMERATION)
|
3078
|
+
Z_COMPILER_TRAIT(TYPE_IS_ENUMERATION)(T)
|
3079
|
+
# elif Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
3080
|
+
!structure_or_union_detected && Helpers::IsUsableToCastNumber<T, true>::value
|
3081
|
+
# else
|
3082
|
+
false
|
3083
|
+
# endif
|
3084
|
+
};
|
3085
|
+
|
3086
|
+
enum { objective_c_instance_detected =
|
3087
|
+
Z_LANGUAGE_INCLUDES(OBJECTIVE_C) &&
|
3088
|
+
Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE) &&
|
3089
|
+
!enumeration_detected &&
|
3090
|
+
!structure_or_union_detected
|
3091
|
+
};
|
3092
|
+
|
3093
|
+
enum { kind = enumeration_detected
|
3094
|
+
? Abstract::Enumeration
|
3095
|
+
: (union_detected
|
3096
|
+
? Abstract::Union
|
3097
|
+
: (objective_c_instance_detected
|
3098
|
+
? Abstract::ObjectiveCInstance
|
3099
|
+
: Abstract::Structure))
|
3100
|
+
};
|
3101
|
+
};
|
3102
|
+
|
3103
|
+
template <Boolean E, class T> struct Case : Mixins::Unqualified<Abstract::Kind<E, Ambiguous<T>::kind, T> > {};
|
3104
|
+
|
3105
|
+
// MARK: - Specializations: Fixed width numeric types
|
3106
|
+
|
3107
|
+
# if Z_TRAIT_HAS(Type, is_uint8)
|
3108
|
+
template <Boolean E> struct Case<E, UInt8> : Mixins::Unqualified<Abstract::UInt8> {};
|
3109
|
+
# endif
|
3110
|
+
|
3111
|
+
# if Z_TRAIT_HAS(Type, is_sint8)
|
3112
|
+
template <Boolean E> struct Case<E, SInt8> : Mixins::Unqualified<Abstract::SInt8> {};
|
3113
|
+
# endif
|
3114
|
+
|
3115
|
+
# if Z_TRAIT_HAS(Type, is_uint16)
|
3116
|
+
template <Boolean E> struct Case<E, UInt16> : Mixins::Unqualified<Abstract::UInt16> {};
|
3117
|
+
# endif
|
3118
|
+
|
3119
|
+
# if Z_TRAIT_HAS(Type, is_sint16)
|
3120
|
+
template <Boolean E> struct Case<E, SInt16> : Mixins::Unqualified<Abstract::SInt16> {};
|
3121
|
+
# endif
|
3122
|
+
|
3123
|
+
# if Z_TRAIT_HAS(Type, is_uint32)
|
3124
|
+
template <Boolean E> struct Case<E, UInt32> : Mixins::Unqualified<Abstract::UInt32> {};
|
3125
|
+
# endif
|
3126
|
+
|
3127
|
+
# if Z_TRAIT_HAS(Type, is_sint32)
|
3128
|
+
template <Boolean E> struct Case<E, SInt32> : Mixins::Unqualified<Abstract::SInt32> {};
|
3129
|
+
# endif
|
3130
|
+
|
3131
|
+
# if Z_TRAIT_HAS(Type, is_uint64)
|
3132
|
+
template <Boolean E> struct Case<E, UInt64> : Mixins::Unqualified<Abstract::UInt64> {};
|
3133
|
+
# endif
|
3134
|
+
|
3135
|
+
# if Z_TRAIT_HAS(Type, is_sint64)
|
3136
|
+
template <Boolean E> struct Case<E, SInt64> : Mixins::Unqualified<Abstract::SInt64> {};
|
3137
|
+
# endif
|
3138
|
+
|
3139
|
+
# if Z_TRAIT_HAS(Type, is_uint128)
|
3140
|
+
template <Boolean E> struct Case<E, UInt128> : Mixins::Unqualified<Abstract::UInt128> {};
|
3141
|
+
# endif
|
3142
|
+
|
3143
|
+
# if Z_TRAIT_HAS(Type, is_sint128)
|
3144
|
+
template <Boolean E> struct Case<E, SInt128> : Mixins::Unqualified<Abstract::SInt128> {};
|
3145
|
+
# endif
|
3146
|
+
|
3147
|
+
# if Z_TRAIT_HAS(Type, is_float16)
|
3148
|
+
template <Boolean E> struct Case<E, Float16> : Mixins::Unqualified<Abstract::Float16> {};
|
3149
|
+
# endif
|
3150
|
+
|
3151
|
+
# if Z_TRAIT_HAS(Type, is_float32)
|
3152
|
+
template <Boolean E> struct Case<E, Float32> : Mixins::Unqualified<Abstract::Float32> {};
|
3153
|
+
# endif
|
3154
|
+
|
3155
|
+
# if Z_TRAIT_HAS(Type, is_float64)
|
3156
|
+
template <Boolean E> struct Case<E, Float64> : Mixins::Unqualified<Abstract::Float64> {};
|
3157
|
+
# endif
|
3158
|
+
|
3159
|
+
# if Z_TRAIT_HAS(Type, is_float128)
|
3160
|
+
template <Boolean E> struct Case<E, Float128> : Mixins::Unqualified<Abstract::Float128> {};
|
3161
|
+
# endif
|
3162
|
+
|
3163
|
+
# if Z_TRAIT_HAS(Type, is_float80_x87)
|
3164
|
+
template <Boolean E> struct Case<E, Float80_x87> : Mixins::Unqualified<Abstract::Float80_x87> {};
|
3165
|
+
# endif
|
3166
|
+
|
3167
|
+
# if Z_TRAIT_HAS(Type, is_float96_x87)
|
3168
|
+
template <Boolean E> struct Case<E, Float96_x87> : Mixins::Unqualified<Abstract::Float96_x87> {};
|
3169
|
+
# endif
|
3170
|
+
|
3171
|
+
# if Z_TRAIT_HAS(Type, is_float128_x87)
|
3172
|
+
template <Boolean E> struct Case<E, Float128_x87> : Mixins::Unqualified<Abstract::Float128_x87> {};
|
3173
|
+
# endif
|
3174
|
+
|
3175
|
+
// MARK: - Specializations: C/C++ fundamental types
|
3176
|
+
|
3177
|
+
template <Boolean E> struct Case<E, void > : Mixins::Unqualified<Abstract::Void > {};
|
3178
|
+
template <Boolean E> struct Case<E, Char > : Mixins::Unqualified<Abstract::Char > {};
|
3179
|
+
template <Boolean E> struct Case<E, UChar > : Mixins::Unqualified<Abstract::UChar > {};
|
3180
|
+
template <Boolean E> struct Case<E, SChar > : Mixins::Unqualified<Abstract::SChar > {};
|
3181
|
+
template <Boolean E> struct Case<E, UShort> : Mixins::Unqualified<Abstract::UShort> {};
|
3182
|
+
template <Boolean E> struct Case<E, SShort> : Mixins::Unqualified<Abstract::SShort> {};
|
3183
|
+
template <Boolean E> struct Case<E, UInt > : Mixins::Unqualified<Abstract::UInt > {};
|
3184
|
+
template <Boolean E> struct Case<E, SInt > : Mixins::Unqualified<Abstract::SInt > {};
|
3185
|
+
template <Boolean E> struct Case<E, ULong > : Mixins::Unqualified<Abstract::ULong > {};
|
3186
|
+
template <Boolean E> struct Case<E, SLong > : Mixins::Unqualified<Abstract::SLong > {};
|
3187
|
+
|
3188
|
+
# ifdef Z_LLONG
|
3189
|
+
template <Boolean E> struct Case<E, ULLong> : Mixins::Unqualified<Abstract::ULLong> {};
|
3190
|
+
template <Boolean E> struct Case<E, SLLong> : Mixins::Unqualified<Abstract::SLLong> {};
|
3191
|
+
# endif
|
3192
|
+
|
3193
|
+
# if Z_TRAIT_HAS(Type, is_float)
|
3194
|
+
template <Boolean E> struct Case<E, Float> : Mixins::Unqualified<Abstract::Float> {};
|
3195
|
+
# endif
|
3196
|
+
|
3197
|
+
# if Z_TRAIT_HAS(Type, is_double)
|
3198
|
+
template <Boolean E> struct Case<E, Double> : Mixins::Unqualified<Abstract::Double> {};
|
3199
|
+
# endif
|
3200
|
+
|
3201
|
+
# if Z_TRAIT_HAS(Type, is_ldouble)
|
3202
|
+
template <Boolean E> struct Case<E, LDouble> : Mixins::Unqualified<Abstract::LDouble> {};
|
3203
|
+
# endif
|
3204
|
+
|
3205
|
+
# if Z_TRAIT_HAS(Type, is_boolean)
|
3206
|
+
template <Boolean E> struct Case<E, Boolean> : Mixins::Unqualified<Abstract::Boolean> {};
|
3207
|
+
# endif
|
3208
|
+
|
3209
|
+
// MARK: - Specializations: C++ specific fundamental types
|
3210
|
+
|
3211
|
+
/*# if Z_TRAIT_HAS(Type, is_wchar)
|
3212
|
+
template <Boolean E> struct Case<E, WChar> : Mixins::Unqualified<Abstract::WChar> {};
|
3213
|
+
# endif
|
3214
|
+
|
3215
|
+
# if Z_TRAIT_HAS(Type, is_char16)
|
3216
|
+
template <Boolean E> struct Case<E, Char16> : Mixins::Unqualified<Abstract::Char16> {};
|
3217
|
+
# endif
|
3218
|
+
|
3219
|
+
# if Z_TRAIT_HAS(Type, is_char32)
|
3220
|
+
template <Boolean E> struct Case<E, Char32> : Mixins::Unqualified<Abstract::Char32> {};
|
3221
|
+
# endif*/
|
3222
|
+
|
3223
|
+
# if Z_TRAIT_HAS(Type, is_null_pointer)
|
3224
|
+
template <Boolean E> struct Case<E, NullPointer> : Mixins::Unqualified<Abstract::NullPointer> {};
|
3225
|
+
# endif
|
3226
|
+
|
3227
|
+
// MARK: - Specializations: Sized arrays
|
3228
|
+
|
3229
|
+
template <Boolean E, class T, USize N> struct Case<E, T[N]> : Mixins::Unqualified<Abstract::SizedArray<E, T, N> > {};
|
3230
|
+
|
3231
|
+
template <Boolean E, class T, USize N> struct Case<E, const T[N]> : Mixins::ConstArray <Case<E, T[N]> > {};
|
3232
|
+
template <Boolean E, class T, USize N> struct Case<E, volatile T[N]> : Mixins::VolatileArray <Case<E, T[N]> > {};
|
3233
|
+
template <Boolean E, class T, USize N> struct Case<E, const volatile T[N]> : Mixins::ConstVolatileArray<Case<E, T[N]> > {};
|
3234
|
+
|
3235
|
+
// MARK: - Specializations: Flexible arrays
|
3236
|
+
|
3237
|
+
template <Boolean E, class T> struct Case<E, T[]> : Mixins::Unqualified<Abstract::FlexibleArray<E, T> > {};
|
3238
|
+
|
3239
|
+
template <Boolean E, class T> struct Case<E, const T[]> : Mixins::ConstArray <Case<E, T[]> > {};
|
3240
|
+
template <Boolean E, class T> struct Case<E, volatile T[]> : Mixins::VolatileArray <Case<E, T[]> > {};
|
3241
|
+
template <Boolean E, class T> struct Case<E, const volatile T[]> : Mixins::ConstVolatileArray<Case<E, T[]> > {};
|
3242
|
+
|
3243
|
+
// MARK: - Specializations: Pointers
|
3244
|
+
|
3245
|
+
template <Boolean E, class T> class Case<E, T*> : public Mixins::Unqualified<Abstract::Pointer<T> > {
|
3246
|
+
private:
|
3247
|
+
typedef Case<false, T> Pointee;
|
3248
|
+
|
3249
|
+
public:
|
3250
|
+
enum { is_callable = Pointee::is_function,
|
3251
|
+
is_function_pointer = Pointee::is_function,
|
3252
|
+
is_void_pointer = Pointee::is_void
|
3253
|
+
};
|
3254
|
+
|
3255
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
3256
|
+
|
3257
|
+
enum { is_objective_c_class_pointer = Pointee::is_objective_c_class,
|
3258
|
+
is_objective_c_object_pointer = Pointee::is_objective_c_object,
|
3259
|
+
};
|
3260
|
+
|
3261
|
+
# if Z_TRAIT_HAS(Type, is_objective_c_instance_pointer)
|
3262
|
+
enum {is_objective_c_instance_pointer = Pointee::is_objective_c_instance};
|
3263
|
+
# endif
|
3264
|
+
|
3265
|
+
# endif
|
3266
|
+
|
3267
|
+
enum {pointer_level = Pointee::pointer_level + 1};
|
3268
|
+
|
3269
|
+
typedef typename TernaryType<is_function_pointer, T, NaT>::type to_function;
|
3270
|
+
};
|
3271
|
+
|
3272
|
+
template <Boolean E, class C, class T> struct Case<E, T C::*> : Mixins::Unqualified<Abstract::DataMemberPointer<T C::*, C, T> > {
|
3273
|
+
enum {pointer_level = Case<E, T>::pointer_level + 1};
|
3274
|
+
};
|
3275
|
+
|
3276
|
+
# if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
3277
|
+
|
3278
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) , C, R(P...) > > {};
|
3279
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) const > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) const , C, R(P...) const > > {};
|
3280
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) const volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) const volatile, C, R(P...) const volatile> > {};
|
3281
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) volatile > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) volatile, C, R(P...) volatile> > {};
|
3282
|
+
|
3283
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) , C, R(P..., ...) > > {};
|
3284
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) const > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) const , C, R(P..., ...) const > > {};
|
3285
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) const volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) const volatile, C, R(P..., ...) const volatile> > {};
|
3286
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) volatile, C, R(P..., ...) volatile> > {};
|
3287
|
+
|
3288
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
3289
|
+
|
3290
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) & , C, R(P...) & > > {};
|
3291
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) &&, C, R(P...) &&> > {};
|
3292
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) const & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) const & , C, R(P...) const & > > {};
|
3293
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) const &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) const &&, C, R(P...) const &&> > {};
|
3294
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) const volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) const volatile & , C, R(P...) const volatile & > > {};
|
3295
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) const volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) const volatile &&, C, R(P...) const volatile &&> > {};
|
3296
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) volatile & , C, R(P...) volatile & > > {};
|
3297
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P...) volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P...) volatile &&, C, R(P...) volatile &&> > {};
|
3298
|
+
|
3299
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) & , C, R(P..., ...) & > > {};
|
3300
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) &&, C, R(P..., ...) &&> > {};
|
3301
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) const & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) const & , C, R(P..., ...) const & > > {};
|
3302
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) const &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) const &&, C, R(P..., ...) const &&> > {};
|
3303
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) const volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) const volatile & , C, R(P..., ...) const volatile & > > {};
|
3304
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) const volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) const volatile &&, C, R(P..., ...) const volatile &&> > {};
|
3305
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) volatile & , C, R(P..., ...) volatile & > > {};
|
3306
|
+
template <Boolean E, class C, class R, class... P> struct Case<E, R(C::*)(P..., ...) volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(P..., ...) volatile &&, C, R(P..., ...) volatile &&> > {};
|
3307
|
+
|
3308
|
+
# endif
|
3309
|
+
|
3310
|
+
# else
|
3311
|
+
|
3312
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() , C, R() > > {};
|
3313
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() const > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() const , C, R() const > > {};
|
3314
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() const volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() const volatile, C, R() const volatile> > {};
|
3315
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() volatile, C, R() volatile> > {};
|
3316
|
+
|
3317
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3318
|
+
\
|
3319
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) > > {}; \
|
3320
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const > > {}; \
|
3321
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile> > {}; \
|
3322
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile> > {}; \
|
3323
|
+
\
|
3324
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) > > {}; \
|
3325
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const > > {}; \
|
3326
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile> > {}; \
|
3327
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile> > {};
|
3328
|
+
|
3329
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3330
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3331
|
+
|
3332
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
3333
|
+
|
3334
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() & , C, R() & > > {};
|
3335
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() &&, C, R() &&> > {};
|
3336
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() const & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() const & , C, R() const & > > {};
|
3337
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() const &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() const &&, C, R() const &&> > {};
|
3338
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() const volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() const volatile & , C, R() const volatile & > > {};
|
3339
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() const volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() const volatile &&, C, R() const volatile &&> > {};
|
3340
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() volatile & , C, R() volatile & > > {};
|
3341
|
+
template <Boolean E, class C, class R> struct Case<E, R(C::*)() volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)() volatile &&, C, R() volatile &&> > {};
|
3342
|
+
|
3343
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3344
|
+
\
|
3345
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) & > > {}; \
|
3346
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&> > {}; \
|
3347
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const & > > {}; \
|
3348
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&> > {}; \
|
3349
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile & > > {}; \
|
3350
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&> > {}; \
|
3351
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile & > > {}; \
|
3352
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&> > {}; \
|
3353
|
+
\
|
3354
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) & > > {}; \
|
3355
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&> > {}; \
|
3356
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const & > > {}; \
|
3357
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&> > {}; \
|
3358
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile & > > {}; \
|
3359
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&> > {}; \
|
3360
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile & > : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile & , C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile & > > {}; \
|
3361
|
+
template <Boolean E, class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&> : Mixins::Unqualified<Abstract::MemberFunctionPointer<R(C::*)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&, C, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&> > {};
|
3362
|
+
|
3363
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3364
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3365
|
+
|
3366
|
+
# endif
|
3367
|
+
|
3368
|
+
# endif
|
3369
|
+
|
3370
|
+
// MARK: - Specializations: References
|
3371
|
+
|
3372
|
+
template <Boolean E, class T> struct Case<E, T&> : Mixins::Unqualified<Abstract::LValueReference<T> > {
|
3373
|
+
enum { is_function_reference = Case<false, T>::is_function,
|
3374
|
+
is_function_lvalue_reference = is_function_reference,
|
3375
|
+
is_callable = is_function_reference
|
3376
|
+
};
|
3377
|
+
|
3378
|
+
typedef typename TernaryType<is_function_reference, T, NaT>::type to_function;
|
3379
|
+
};
|
3380
|
+
|
3381
|
+
# if Z_TRAIT_HAS(Type, is_rvalue_reference)
|
3382
|
+
|
3383
|
+
template <Boolean E, class T> struct Case<E, T&&> : Mixins::Unqualified<Abstract::RValueReference<T> > {
|
3384
|
+
enum { is_function_reference = Case<false, T>::is_function,
|
3385
|
+
is_function_rvalue_reference = is_function_reference,
|
3386
|
+
is_callable = is_function_reference
|
3387
|
+
};
|
3388
|
+
|
3389
|
+
typedef typename TernaryType<is_function_reference, T, NaT>::type to_function;
|
3390
|
+
};
|
3391
|
+
|
3392
|
+
# endif
|
3393
|
+
|
3394
|
+
// MARK: - Specializations: Functions
|
3395
|
+
|
3396
|
+
# if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
3397
|
+
|
3398
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...)> : Mixins::UnqualifiedFunction<Abstract::Function<R, P...> > {};
|
3399
|
+
|
3400
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) const > : Mixins::ConstFunction <Case<E, R(P...)> > {};
|
3401
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) const volatile> : Mixins::ConstVolatileFunction<Case<E, R(P...)> > {};
|
3402
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) volatile> : Mixins::VolatileFunction <Case<E, R(P...)> > {};
|
3403
|
+
|
3404
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...)> : Mixins::UnqualifiedFunction<Abstract::VariadicFunction<R, P...> > {};
|
3405
|
+
|
3406
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) const > : Mixins::ConstFunction <Case<E, R(P..., ...)> > {};
|
3407
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) const volatile> : Mixins::ConstVolatileFunction<Case<E, R(P..., ...)> > {};
|
3408
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) volatile> : Mixins::VolatileFunction <Case<E, R(P..., ...)> > {};
|
3409
|
+
|
3410
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
3411
|
+
|
3412
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) & > : Mixins::LValueFunction <Case<E, R(P...)> > {};
|
3413
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) &&> : Mixins::RValueFunction <Case<E, R(P...)> > {};
|
3414
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) const & > : Mixins::ConstLValueFunction <Case<E, R(P...)> > {};
|
3415
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) const &&> : Mixins::ConstRValueFunction <Case<E, R(P...)> > {};
|
3416
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) const volatile & > : Mixins::ConstVolatileLValueFunction<Case<E, R(P...)> > {};
|
3417
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) const volatile &&> : Mixins::ConstVolatileRValueFunction<Case<E, R(P...)> > {};
|
3418
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) volatile & > : Mixins::VolatileLValueFunction <Case<E, R(P...)> > {};
|
3419
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P...) volatile &&> : Mixins::VolatileRValueFunction <Case<E, R(P...)> > {};
|
3420
|
+
|
3421
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) & > : Mixins::LValueFunction <Case<E, R(P..., ...)> > {};
|
3422
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) &&> : Mixins::RValueFunction <Case<E, R(P..., ...)> > {};
|
3423
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) const & > : Mixins::ConstLValueFunction <Case<E, R(P..., ...)> > {};
|
3424
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) const &&> : Mixins::ConstRValueFunction <Case<E, R(P..., ...)> > {};
|
3425
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) const volatile & > : Mixins::ConstVolatileLValueFunction<Case<E, R(P..., ...)> > {};
|
3426
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) const volatile &&> : Mixins::ConstVolatileRValueFunction<Case<E, R(P..., ...)> > {};
|
3427
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) volatile & > : Mixins::VolatileLValueFunction <Case<E, R(P..., ...)> > {};
|
3428
|
+
template <Boolean E, class R, class... P> struct Case<E, R(P..., ...) volatile &&> : Mixins::VolatileRValueFunction <Case<E, R(P..., ...)> > {};
|
3429
|
+
|
3430
|
+
# endif
|
3431
|
+
|
3432
|
+
# else
|
3433
|
+
|
3434
|
+
template <Boolean E, class R> struct Case<E, R()> : Mixins::UnqualifiedFunction<Abstract::FunctionWith0Parameters<R> > {};
|
3435
|
+
|
3436
|
+
template <Boolean E, class R> struct Case<E, R() const > : Mixins::ConstFunction <Case<E, R()> > {};
|
3437
|
+
template <Boolean E, class R> struct Case<E, R() const volatile> : Mixins::ConstVolatileFunction<Case<E, R()> > {};
|
3438
|
+
template <Boolean E, class R> struct Case<E, R() volatile> : Mixins::VolatileFunction <Case<E, R()> > {};
|
3439
|
+
|
3440
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3441
|
+
\
|
3442
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> : Mixins::UnqualifiedFunction<Abstract::FunctionWith##parameter_count##Parameters<R, Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)> > {}; \
|
3443
|
+
\
|
3444
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const > : Mixins::ConstFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3445
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile> : Mixins::ConstVolatileFunction<Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3446
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile> : Mixins::VolatileFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3447
|
+
\
|
3448
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> : Mixins::UnqualifiedFunction<Abstract::VariadicFunctionWith##parameter_count##Parameters<R, Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)> > {}; \
|
3449
|
+
\
|
3450
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const > : Mixins::ConstFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3451
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile> : Mixins::ConstVolatileFunction<Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3452
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile> : Mixins::VolatileFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {};
|
3453
|
+
|
3454
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3455
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3456
|
+
|
3457
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
3458
|
+
|
3459
|
+
template <Boolean E, class R> struct Case<E, R() & > : Mixins::LValueFunction <Case<E, R()> > {};
|
3460
|
+
template <Boolean E, class R> struct Case<E, R() &&> : Mixins::RValueFunction <Case<E, R()> > {};
|
3461
|
+
template <Boolean E, class R> struct Case<E, R() const & > : Mixins::ConstLValueFunction <Case<E, R()> > {};
|
3462
|
+
template <Boolean E, class R> struct Case<E, R() const &&> : Mixins::ConstRValueFunction <Case<E, R()> > {};
|
3463
|
+
template <Boolean E, class R> struct Case<E, R() const volatile & > : Mixins::ConstVolatileLValueFunction<Case<E, R()> > {};
|
3464
|
+
template <Boolean E, class R> struct Case<E, R() const volatile &&> : Mixins::ConstVolatileRValueFunction<Case<E, R()> > {};
|
3465
|
+
template <Boolean E, class R> struct Case<E, R() volatile & > : Mixins::VolatileLValueFunction <Case<E, R()> > {};
|
3466
|
+
template <Boolean E, class R> struct Case<E, R() volatile &&> : Mixins::VolatileRValueFunction <Case<E, R()> > {};
|
3467
|
+
|
3468
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3469
|
+
\
|
3470
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) & > : Mixins::LValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3471
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&> : Mixins::RValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3472
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const & > : Mixins::ConstLValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3473
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&> : Mixins::ConstRValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3474
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile & > : Mixins::ConstVolatileLValueFunction<Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3475
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&> : Mixins::ConstVolatileRValueFunction<Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3476
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile & > : Mixins::VolatileLValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3477
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&> : Mixins::VolatileRValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA))> > {}; \
|
3478
|
+
\
|
3479
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) & > : Mixins::LValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3480
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&> : Mixins::RValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3481
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const & > : Mixins::ConstLValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3482
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&> : Mixins::ConstRValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3483
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile & > : Mixins::ConstVolatileLValueFunction<Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3484
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&> : Mixins::ConstVolatileRValueFunction<Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3485
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile & > : Mixins::VolatileLValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {}; \
|
3486
|
+
template <Boolean E, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&> : Mixins::VolatileRValueFunction <Case<E, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...)> > {};
|
3487
|
+
|
3488
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3489
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3490
|
+
|
3491
|
+
# endif
|
3492
|
+
|
3493
|
+
# endif
|
3494
|
+
|
3495
|
+
// MARK: - Specializations: Apple blocks
|
3496
|
+
|
3497
|
+
// MARK: - Specializations: Objective-C
|
3498
|
+
|
3499
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
3500
|
+
template <Boolean E> struct Case<E, Helpers::RemovePointer<id >::type> : Mixins::Unqualified<Abstract::ObjectiveCObject> {};
|
3501
|
+
template <Boolean E> struct Case<E, Helpers::RemovePointer<Class>::type> : Mixins::Unqualified<Abstract::ObjectiveCClass > {};
|
3502
|
+
# endif
|
3503
|
+
|
3504
|
+
// MARK: - Specializations: Qualified types
|
3505
|
+
|
3506
|
+
template <Boolean E, class T> struct Case<E, const T> : TernaryType<Case<false, T>::is_signed_or_unsigned, Mixins::ConstSignedOrUnsigned <Case<E, T> >, Mixins::Const <Case<E, T> > >::type {};
|
3507
|
+
template <Boolean E, class T> struct Case<E, const volatile T> : TernaryType<Case<false, T>::is_signed_or_unsigned, Mixins::ConstVolatileSignedOrUnsigned<Case<E, T> >, Mixins::ConstVolatile<Case<E, T> > >::type {};
|
3508
|
+
template <Boolean E, class T> struct Case<E, volatile T> : TernaryType<Case<false, T>::is_signed_or_unsigned, Mixins::VolatileSignedOrUnsigned <Case<E, T> >, Mixins::Volatile <Case<E, T> > >::type {};
|
3509
|
+
|
3510
|
+
// MARK: - Final aggregate
|
3511
|
+
|
3512
|
+
template <class T> struct Final : Mixins::Kind<
|
3513
|
+
Case<false, T>::is_storable
|
3514
|
+
? (Case<false, T>::is_pointer
|
3515
|
+
? (Case<false, T>::is_member_function_pointer
|
3516
|
+
? Mixins::MemberFunctionPointer
|
3517
|
+
: (Case<false, T>::is_void_pointer ? Mixins::VoidPointer : Mixins::Pointer))
|
3518
|
+
: (Case<false, T>::is_reference
|
3519
|
+
? Mixins::Reference
|
3520
|
+
: Mixins::Value))
|
3521
|
+
: (Case<false, T>::is_void
|
3522
|
+
? Mixins::Void
|
3523
|
+
: (Case<false, T>::is_function && Case<false, T>::is_qualified
|
3524
|
+
? Mixins::InconvertibleFunction
|
3525
|
+
: Mixins::ConvertibleFunction)),
|
3526
|
+
Case<true, T>
|
3527
|
+
> {
|
3528
|
+
typedef typename TernaryType<
|
3529
|
+
Final::is_structure_or_union,
|
3530
|
+
typename Final<const typename Final::remove_const_volatile>::add_lvalue_reference, T
|
3531
|
+
>::type to_forwardable;
|
3532
|
+
};
|
3533
|
+
|
3534
|
+
template <> struct Final< NaT> : Abstract::Invalid {};
|
3535
|
+
template <> struct Final<const NaT> : Abstract::Invalid {};
|
3536
|
+
template <> struct Final<const volatile NaT> : Abstract::Invalid {};
|
3537
|
+
template <> struct Final< volatile NaT> : Abstract::Invalid {};
|
3538
|
+
}}}
|
3539
|
+
|
3540
|
+
namespace Zeta {
|
3541
|
+
|
3542
|
+
template <class A, class B> struct TypeAreEqual : False {};
|
3543
|
+
template <class A > struct TypeAreEqual<A, A> : True {};
|
3544
|
+
|
3545
|
+
# if Z_HAS_TRAIT(TypeIsAssignable)
|
3546
|
+
|
3547
|
+
template <class T, class from_type> struct TypeIsAssignable {
|
3548
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_ASSIGNABLE)(T, from_type)};
|
3549
|
+
};
|
3550
|
+
|
3551
|
+
# endif
|
3552
|
+
|
3553
|
+
# if Z_HAS_TRAIT(TypeIsBase)
|
3554
|
+
|
3555
|
+
template <class T, class of_type> struct TypeIsBase {
|
3556
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_BASE)(T, of_type)};
|
3557
|
+
};
|
3558
|
+
|
3559
|
+
# endif
|
3560
|
+
|
3561
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
3562
|
+
|
3563
|
+
namespace {
|
3564
|
+
template <class T, SInt at_line> struct TypeIsComplete : Detail::Type::Helpers::IsComplete <T, at_line, true> {};
|
3565
|
+
template <class T, SInt at_line> struct TypeIsIncomplete : Detail::Type::Helpers::IsIncomplete<T, at_line, true> {};
|
3566
|
+
}
|
3567
|
+
|
3568
|
+
# endif
|
3569
|
+
|
3570
|
+
# if Z_HAS_TRAIT(TypeIsConvertible)
|
3571
|
+
|
3572
|
+
template <class T, class to_type> struct TypeIsConvertible {
|
3573
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_CONVERTIBLE)(T, to_type)};
|
3574
|
+
};
|
3575
|
+
|
3576
|
+
# endif
|
3577
|
+
|
3578
|
+
# if Z_HAS_TRAIT(TypeIsConstructible)
|
3579
|
+
|
3580
|
+
template <class T, class... parameters> struct TypeIsConstructible {
|
3581
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_CONSTRUCTIBLE)(T, parameters...)};
|
3582
|
+
};
|
3583
|
+
|
3584
|
+
# endif
|
3585
|
+
|
3586
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE) && Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE)
|
3587
|
+
|
3588
|
+
template <class T, class compatible_call_prototype> struct TypeIsFunctional;
|
3589
|
+
template <class T, class compatible_call_prototype> struct TypeIsFunctor;
|
3590
|
+
|
3591
|
+
# if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
3592
|
+
|
3593
|
+
template <class T, class R, class... P> struct TypeIsFunctional<T, R(P...)> : Detail::Type::Helpers::IsFunctional<T, R(P...), R> {};
|
3594
|
+
template <class T, class R, class... P> struct TypeIsFunctor <T, R(P...)> : Detail::Type::Helpers::IsFunctor <T, R(P...), R> {};
|
3595
|
+
|
3596
|
+
# else
|
3597
|
+
|
3598
|
+
template <class T, class R> struct TypeIsFunctional<T, R()> : Detail::Type::Helpers::IsFunctional<T, R(), R> {};
|
3599
|
+
template <class T, class R> struct TypeIsFunctor <T, R()> : Detail::Type::Helpers::IsFunctor <T, R(), R> {};
|
3600
|
+
|
3601
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3602
|
+
\
|
3603
|
+
template <class T, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeIsFunctional< \
|
3604
|
+
T, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) \
|
3605
|
+
> : Detail::Type::Helpers::IsFunctional<T, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)), R> {}; \
|
3606
|
+
\
|
3607
|
+
template <class T, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeIsFunctor< \
|
3608
|
+
T, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) \
|
3609
|
+
> : Detail::Type::Helpers::IsFunctor<T, R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)), R> {};
|
3610
|
+
|
3611
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3612
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3613
|
+
|
3614
|
+
# endif
|
3615
|
+
|
3616
|
+
# endif
|
3617
|
+
|
3618
|
+
# if Z_HAS_TRAIT(TypeIsNothrowAssignable)
|
3619
|
+
|
3620
|
+
template <class T, class from_type> struct TypeIsNothrowAssignable {
|
3621
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_NOTHROW_ASSIGNABLE)(T, from_type)};
|
3622
|
+
};
|
3623
|
+
|
3624
|
+
# endif
|
3625
|
+
|
3626
|
+
# if Z_HAS_TRAIT(TypeIsNothrowConstructible)
|
3627
|
+
|
3628
|
+
template <class T, class... parameters> struct TypeIsNothrowConstructible {
|
3629
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_NOTHROW_CONSTRUCTIBLE)(T, parameters...)};
|
3630
|
+
};
|
3631
|
+
|
3632
|
+
# endif
|
3633
|
+
|
3634
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyAssignable)
|
3635
|
+
|
3636
|
+
template <class T, class from_type> struct TypeIsTriviallyAssignable {
|
3637
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_ASSIGNABLE)(T, from_type)};
|
3638
|
+
};
|
3639
|
+
|
3640
|
+
# endif
|
3641
|
+
|
3642
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyConstructible)
|
3643
|
+
|
3644
|
+
template <class T, class... parameters> struct TypeIsTriviallyConstructible {
|
3645
|
+
enum {value = Z_COMPILER_TRAIT(TYPE_IS_TRIVIALLY_CONSTRUCTIBLE)(T, parameters...)};
|
3646
|
+
};
|
3647
|
+
|
3648
|
+
# endif
|
3649
|
+
|
3650
|
+
template <class T, class klass> struct TypeToMemberPointer;
|
3651
|
+
|
3652
|
+
template <class T, class C> struct TypeToMemberPointer {typedef T C::*type;};
|
3653
|
+
|
3654
|
+
template <class C> struct TypeToMemberPointer< void, C> {typedef NaT type;};
|
3655
|
+
template <class C> struct TypeToMemberPointer<const void, C> {typedef NaT type;};
|
3656
|
+
template <class C> struct TypeToMemberPointer<const volatile void, C> {typedef NaT type;};
|
3657
|
+
template <class C> struct TypeToMemberPointer< volatile void, C> {typedef NaT type;};
|
3658
|
+
|
3659
|
+
# if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE)
|
3660
|
+
|
3661
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) , C> {typedef R(C::*type)(P...) ;};
|
3662
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) const , C> {typedef R(C::*type)(P...) const ;};
|
3663
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) const volatile, C> {typedef R(C::*type)(P...) const volatile;};
|
3664
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) volatile, C> {typedef R(C::*type)(P...) volatile;};
|
3665
|
+
|
3666
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) , C> {typedef R(C::*type)(P..., ...) ;};
|
3667
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) const , C> {typedef R(C::*type)(P..., ...) const ;};
|
3668
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) const volatile, C> {typedef R(C::*type)(P..., ...) const volatile;};
|
3669
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) volatile, C> {typedef R(C::*type)(P..., ...) volatile;};
|
3670
|
+
|
3671
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
3672
|
+
|
3673
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) & , C> {typedef R(C::*type)(P...) & ;};
|
3674
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) &&, C> {typedef R(C::*type)(P...) &&;};
|
3675
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) const & , C> {typedef R(C::*type)(P...) const & ;};
|
3676
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) const &&, C> {typedef R(C::*type)(P...) const &&;};
|
3677
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) const volatile & , C> {typedef R(C::*type)(P...) const volatile & ;};
|
3678
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) const volatile &&, C> {typedef R(C::*type)(P...) const volatile &&;};
|
3679
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) volatile & , C> {typedef R(C::*type)(P...) volatile & ;};
|
3680
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P...) volatile &&, C> {typedef R(C::*type)(P...) volatile &&;};
|
3681
|
+
|
3682
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) & , C> {typedef R(C::*type)(P..., ...) & ;};
|
3683
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) &&, C> {typedef R(C::*type)(P..., ...) &&;};
|
3684
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) const & , C> {typedef R(C::*type)(P..., ...) const & ;};
|
3685
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) const &&, C> {typedef R(C::*type)(P..., ...) const &&;};
|
3686
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) const volatile & , C> {typedef R(C::*type)(P..., ...) const volatile & ;};
|
3687
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) const volatile &&, C> {typedef R(C::*type)(P..., ...) const volatile &&;};
|
3688
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) volatile & , C> {typedef R(C::*type)(P..., ...) volatile & ;};
|
3689
|
+
template <class C, class R, class... P> struct TypeToMemberPointer<R(P..., ...) volatile &&, C> {typedef R(C::*type)(P..., ...) volatile &&;};
|
3690
|
+
|
3691
|
+
# endif
|
3692
|
+
|
3693
|
+
# else
|
3694
|
+
|
3695
|
+
template <class C, class R> struct TypeToMemberPointer<R() , C> {typedef R(C::*type)() ;};
|
3696
|
+
template <class C, class R> struct TypeToMemberPointer<R() const , C> {typedef R(C::*type)() const ;};
|
3697
|
+
template <class C, class R> struct TypeToMemberPointer<R() const volatile, C> {typedef R(C::*type)() const volatile;};
|
3698
|
+
template <class C, class R> struct TypeToMemberPointer<R() volatile, C> {typedef R(C::*type)() volatile;};
|
3699
|
+
|
3700
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3701
|
+
\
|
3702
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) ;}; \
|
3703
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const ;}; \
|
3704
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile;}; \
|
3705
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile;}; \
|
3706
|
+
\
|
3707
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) ;}; \
|
3708
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const ;}; \
|
3709
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile;}; \
|
3710
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile;};
|
3711
|
+
|
3712
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3713
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3714
|
+
|
3715
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
3716
|
+
|
3717
|
+
template <class C, class R> struct TypeToMemberPointer<R() & , C> {typedef R(C::*type)() & ;};
|
3718
|
+
template <class C, class R> struct TypeToMemberPointer<R() &&, C> {typedef R(C::*type)() &&;};
|
3719
|
+
template <class C, class R> struct TypeToMemberPointer<R() const & , C> {typedef R(C::*type)() const & ;};
|
3720
|
+
template <class C, class R> struct TypeToMemberPointer<R() const &&, C> {typedef R(C::*type)() const &&;};
|
3721
|
+
template <class C, class R> struct TypeToMemberPointer<R() const volatile & , C> {typedef R(C::*type)() const volatile & ;};
|
3722
|
+
template <class C, class R> struct TypeToMemberPointer<R() const volatile &&, C> {typedef R(C::*type)() const volatile &&;};
|
3723
|
+
template <class C, class R> struct TypeToMemberPointer<R() volatile & , C> {typedef R(C::*type)() volatile & ;};
|
3724
|
+
template <class C, class R> struct TypeToMemberPointer<R() volatile &&, C> {typedef R(C::*type)() volatile &&;};
|
3725
|
+
|
3726
|
+
# define Z_TEMPLATE_SPECIALIZATIONS(parameter_count) \
|
3727
|
+
\
|
3728
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) & ;}; \
|
3729
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) &&;}; \
|
3730
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const & ;}; \
|
3731
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const &&;}; \
|
3732
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile & ;}; \
|
3733
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) const volatile &&;}; \
|
3734
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile & ;}; \
|
3735
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA)) volatile &&;}; \
|
3736
|
+
\
|
3737
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) & ;}; \
|
3738
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) &&;}; \
|
3739
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const & ;}; \
|
3740
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const &&;}; \
|
3741
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile & ;}; \
|
3742
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) const volatile &&;}; \
|
3743
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile & , C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile & ;}; \
|
3744
|
+
template <class C, class R, Z_FOR_##parameter_count##_APPEND_INDEX(class P, Z_COMMA)> struct TypeToMemberPointer<R(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&, C> {typedef R(C::*type)(Z_FOR_##parameter_count##_APPEND_INDEX(P, Z_COMMA), ...) volatile &&;};
|
3745
|
+
|
3746
|
+
Z_FOR_32_CALL_WITH_TIME(Z_TEMPLATE_SPECIALIZATIONS, Z_EMPTY)
|
3747
|
+
# undef Z_TEMPLATE_SPECIALIZATIONS
|
3748
|
+
|
3749
|
+
# endif
|
3750
|
+
|
3751
|
+
# endif
|
3752
|
+
|
3753
|
+
template <class T> class Type : public Detail::Type::Final<T> {
|
3754
|
+
public:
|
3755
|
+
|
3756
|
+
# if Z_TRAIT_HAS(Type, to_member_pointer)
|
3757
|
+
template <class klass> using to_member_pointer = typename TypeToMemberPointer<typename Type::type, klass>::type;
|
3758
|
+
# endif
|
3759
|
+
|
3760
|
+
# if Z_COMPILER_HAS_MAGIC_CONSTANT(MANGLED_FUNCTION_NAME) && Z_LANGUAGE_HAS(CPP, CPP14_RULES_ON_CONSTANT_EXPRESSION_FUNCTION)
|
3761
|
+
|
3762
|
+
# define Z_IMPLEMENTATION_MEMBER_FUNCTIONS \
|
3763
|
+
static Z_CT(CPP14) USize string_size() {return type_string_size <T>() ;} \
|
3764
|
+
static Z_CT(CPP14) SizedString<string_size()> string () {return type_string <T>() ;} \
|
3765
|
+
static Z_CT(CPP14) Symbol symbol () {return Symbol(type_string<T>());}
|
3766
|
+
|
3767
|
+
Z_IMPLEMENTATION_MEMBER_FUNCTIONS
|
3768
|
+
# else
|
3769
|
+
# define Z_IMPLEMENTATION_MEMBER_FUNCTIONS
|
3770
|
+
# endif
|
3771
|
+
|
3772
|
+
struct flow {
|
3773
|
+
enum { is_arithmetic = Type::is_arithmetic,
|
3774
|
+
is_array = Type::is_array,
|
3775
|
+
is_callable = Type::is_callable,
|
3776
|
+
is_char = Type::is_char,
|
3777
|
+
is_class = Type::is_class,
|
3778
|
+
is_const = Type::is_const,
|
3779
|
+
is_const_volatile = Type::is_const_volatile,
|
3780
|
+
is_data_member_pointer = Type::is_data_member_pointer,
|
3781
|
+
is_empty = Type::is_empty,
|
3782
|
+
is_exact = Type::is_exact,
|
3783
|
+
is_integer = Type::is_integer,
|
3784
|
+
is_integral = Type::is_integral,
|
3785
|
+
is_flexible_array = Type::is_flexible_array,
|
3786
|
+
is_function = Type::is_function,
|
3787
|
+
is_function_lvalue_reference = Type::is_function_lvalue_reference,
|
3788
|
+
is_function_pointer = Type::is_function_pointer,
|
3789
|
+
is_function_reference = Type::is_function_reference,
|
3790
|
+
is_fundamental = Type::is_fundamental,
|
3791
|
+
is_lvalue_reference = Type::is_lvalue_reference,
|
3792
|
+
is_member_function_pointer = Type::is_member_function_pointer,
|
3793
|
+
is_member_pointer = Type::is_member_pointer,
|
3794
|
+
is_nat = Type::is_nat,
|
3795
|
+
is_natural = Type::is_natural,
|
3796
|
+
is_number = Type::is_number,
|
3797
|
+
is_pointer = Type::is_pointer,
|
3798
|
+
is_qualified = Type::is_qualified,
|
3799
|
+
is_real = Type::is_real,
|
3800
|
+
is_reference = Type::is_reference,
|
3801
|
+
is_scalar = Type::is_scalar,
|
3802
|
+
is_schar = Type::is_schar,
|
3803
|
+
is_signed = Type::is_signed,
|
3804
|
+
is_signed_or_unsigned = Type::is_signed_or_unsigned,
|
3805
|
+
is_simple = Type::is_simple,
|
3806
|
+
is_sint = Type::is_sint,
|
3807
|
+
is_slong = Type::is_slong,
|
3808
|
+
is_sshort = Type::is_sshort,
|
3809
|
+
is_statically_allocatable = Type::is_statically_allocatable,
|
3810
|
+
is_storable = Type::is_storable,
|
3811
|
+
is_structure = Type::is_structure,
|
3812
|
+
is_structure_or_union = Type::is_structure_or_union,
|
3813
|
+
is_uchar = Type::is_uchar,
|
3814
|
+
is_uint = Type::is_uint,
|
3815
|
+
is_ulong = Type::is_ulong,
|
3816
|
+
is_unsigned = Type::is_unsigned,
|
3817
|
+
is_ushort = Type::is_ushort,
|
3818
|
+
is_valid = Type::is_valid,
|
3819
|
+
is_variadic = Type::is_variadic,
|
3820
|
+
is_variadic_function = Type::is_variadic_function,
|
3821
|
+
is_void = Type::is_void,
|
3822
|
+
is_void_pointer = Type::is_void_pointer,
|
3823
|
+
is_volatile = Type::is_volatile
|
3824
|
+
};
|
3825
|
+
|
3826
|
+
enum { arity = Type::arity,
|
3827
|
+
element_count = Type::element_count,
|
3828
|
+
pointer_level = Type::pointer_level
|
3829
|
+
};
|
3830
|
+
|
3831
|
+
enum { bits = Type::bits,
|
3832
|
+
size = Type::size
|
3833
|
+
};
|
3834
|
+
|
3835
|
+
typedef Type end;
|
3836
|
+
|
3837
|
+
typedef typename Type::type type;
|
3838
|
+
|
3839
|
+
typedef typename Type<typename Type::add_const >::flow add_const;
|
3840
|
+
typedef typename Type<typename Type::add_const_volatile >::flow add_const_volatile;
|
3841
|
+
typedef typename Type<typename Type::add_lvalue_reference >::flow add_lvalue_reference;
|
3842
|
+
typedef typename Type<typename Type::add_pointer >::flow add_pointer;
|
3843
|
+
typedef typename Type<typename Type::add_volatile >::flow add_volatile;
|
3844
|
+
typedef typename Type<typename Type::class_type >::flow class_type;
|
3845
|
+
typedef typename Type<typename Type::element_type >::flow element_type;
|
3846
|
+
typedef typename Type<typename Type::pointee_type >::flow pointee_type;
|
3847
|
+
typedef typename Type<typename Type::referencee_type >::flow referencee_type;
|
3848
|
+
typedef typename Type<typename Type::remove_const >::flow remove_const;
|
3849
|
+
typedef typename Type<typename Type::remove_const_volatile>::flow remove_const_volatile;
|
3850
|
+
typedef typename Type<typename Type::remove_pointer >::flow remove_pointer;
|
3851
|
+
typedef typename Type<typename Type::remove_reference >::flow remove_reference;
|
3852
|
+
typedef typename Type<typename Type::remove_volatile >::flow remove_volatile;
|
3853
|
+
typedef typename Type<typename Type::return_type >::flow return_type;
|
3854
|
+
typedef typename Type<typename Type::to_const >::flow to_const;
|
3855
|
+
typedef typename Type<typename Type::to_const_volatile >::flow to_const_volatile;
|
3856
|
+
typedef typename Type<typename Type::to_forwardable >::flow to_forwardable;
|
3857
|
+
typedef typename Type<typename Type::to_function >::flow to_function;
|
3858
|
+
typedef typename Type<typename Type::to_lvalue_reference >::flow to_lvalue_reference;
|
3859
|
+
typedef typename Type<typename Type::to_opaque >::flow to_opaque;
|
3860
|
+
typedef typename Type<typename Type::to_pointer >::flow to_pointer;
|
3861
|
+
typedef typename Type<typename Type::to_signed >::flow to_signed;
|
3862
|
+
typedef typename Type<typename Type::to_unqualified >::flow to_unqualified;
|
3863
|
+
typedef typename Type<typename Type::to_unsigned >::flow to_unsigned;
|
3864
|
+
typedef typename Type<typename Type::to_volatile >::flow to_volatile;
|
3865
|
+
typedef typename Type<typename Type::to_wrap >::flow to_wrap;
|
3866
|
+
|
3867
|
+
# if Z_TRAIT_HAS(Type, has_virtual_destructor)
|
3868
|
+
enum {has_virtual_destructor = Type::has_virtual_destructor};
|
3869
|
+
# endif
|
3870
|
+
|
3871
|
+
# if Z_TRAIT_HAS(Type, is_abstract)
|
3872
|
+
enum {is_abstract = Type::is_abstract};
|
3873
|
+
# endif
|
3874
|
+
|
3875
|
+
# if Z_TRAIT_HAS(Type, is_aggregate)
|
3876
|
+
enum {is_aggregate = Type::is_aggregate};
|
3877
|
+
# endif
|
3878
|
+
|
3879
|
+
# if Z_TRAIT_HAS(Type, is_boolean)
|
3880
|
+
enum {is_boolean = Type::is_boolean};
|
3881
|
+
# endif
|
3882
|
+
|
3883
|
+
/*# if Z_TRAIT_HAS(Type, is_char16)
|
3884
|
+
enum {is_char16 = Type::is_char16};
|
3885
|
+
# endif
|
3886
|
+
|
3887
|
+
# if Z_TRAIT_HAS(Type, is_char32)
|
3888
|
+
enum {is_char32 = Type::is_char32};
|
3889
|
+
# endif*/
|
3890
|
+
|
3891
|
+
# if Z_TRAIT_HAS(Type, is_default_constructible)
|
3892
|
+
enum {is_default_constructible = Type::is_default_constructible};
|
3893
|
+
# endif
|
3894
|
+
|
3895
|
+
# if Z_TRAIT_HAS(Type, is_double)
|
3896
|
+
enum {is_double = Type::is_double};
|
3897
|
+
# endif
|
3898
|
+
|
3899
|
+
# if Z_TRAIT_HAS(Type, is_enumeration)
|
3900
|
+
enum {is_enumeration = Type::is_enumeration};
|
3901
|
+
# endif
|
3902
|
+
|
3903
|
+
# if Z_TRAIT_HAS(Type, is_final)
|
3904
|
+
enum {is_final = Type::is_final};
|
3905
|
+
# endif
|
3906
|
+
|
3907
|
+
# if Z_TRAIT_HAS(Type, is_float)
|
3908
|
+
enum {is_float = Type::is_float};
|
3909
|
+
# endif
|
3910
|
+
|
3911
|
+
# if Z_TRAIT_HAS(Type, is_float16)
|
3912
|
+
enum {is_float16 = Type::is_float16};
|
3913
|
+
# endif
|
3914
|
+
|
3915
|
+
# if Z_TRAIT_HAS(Type, is_float32)
|
3916
|
+
enum {is_float32 = Type::is_float32};
|
3917
|
+
# endif
|
3918
|
+
|
3919
|
+
# if Z_TRAIT_HAS(Type, is_float64)
|
3920
|
+
enum {is_float64 = Type::is_float64};
|
3921
|
+
# endif
|
3922
|
+
|
3923
|
+
# if Z_TRAIT_HAS(Type, is_float128)
|
3924
|
+
enum {is_float128 = Type::is_float128};
|
3925
|
+
# endif
|
3926
|
+
|
3927
|
+
# if Z_TRAIT_HAS(Type, is_float80_x87)
|
3928
|
+
enum {is_float80_x87 = Type::is_float80_x87};
|
3929
|
+
# endif
|
3930
|
+
|
3931
|
+
# if Z_TRAIT_HAS(Type, is_float96_x87)
|
3932
|
+
enum {is_float96_x87 = Type::is_float96_x87};
|
3933
|
+
# endif
|
3934
|
+
|
3935
|
+
# if Z_TRAIT_HAS(Type, is_float128_x87)
|
3936
|
+
enum {is_float128_x87 = Type::is_float128_x87};
|
3937
|
+
# endif
|
3938
|
+
|
3939
|
+
# if Z_TRAIT_HAS(Type, is_interface_class)
|
3940
|
+
enum {is_interface_class = Type::is_interface_class};
|
3941
|
+
# endif
|
3942
|
+
|
3943
|
+
# if Z_TRAIT_HAS(Type, is_ldouble)
|
3944
|
+
enum {is_ldouble = Type::is_ldouble};
|
3945
|
+
# endif
|
3946
|
+
|
3947
|
+
# if Z_TRAIT_HAS(Type, is_literal)
|
3948
|
+
enum {is_literal = Type::is_literal};
|
3949
|
+
# endif
|
3950
|
+
|
3951
|
+
# if Z_TRAIT_HAS(Type, is_null_pointer)
|
3952
|
+
enum {is_null_pointer = Type::is_null_pointer};
|
3953
|
+
# endif
|
3954
|
+
|
3955
|
+
# if Z_TRAIT_HAS(Type, is_pod)
|
3956
|
+
enum {is_pod = Type::is_pod};
|
3957
|
+
# endif
|
3958
|
+
|
3959
|
+
# if Z_TRAIT_HAS(Type, is_polymorphic)
|
3960
|
+
enum {is_polymorphic = Type::is_polymorphic};
|
3961
|
+
# endif
|
3962
|
+
|
3963
|
+
# if Z_TRAIT_HAS(Type, is_sint8)
|
3964
|
+
enum {is_sint8 = Type::is_sint8};
|
3965
|
+
# endif
|
3966
|
+
|
3967
|
+
# if Z_TRAIT_HAS(Type, is_sint16)
|
3968
|
+
enum {is_sint16 = Type::is_sint16};
|
3969
|
+
# endif
|
3970
|
+
|
3971
|
+
# if Z_TRAIT_HAS(Type, is_sint32)
|
3972
|
+
enum {is_sint32 = Type::is_sint32};
|
3973
|
+
# endif
|
3974
|
+
|
3975
|
+
# if Z_TRAIT_HAS(Type, is_sint64)
|
3976
|
+
enum {is_sint64 = Type::is_sint64};
|
3977
|
+
# endif
|
3978
|
+
|
3979
|
+
# if Z_TRAIT_HAS(Type, is_sint128)
|
3980
|
+
enum {is_sint128 = Type::is_sint128};
|
3981
|
+
# endif
|
3982
|
+
|
3983
|
+
# if Z_TRAIT_HAS(Type, is_template)
|
3984
|
+
enum {is_template = Type::is_template};
|
3985
|
+
# endif
|
3986
|
+
|
3987
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_assignable)
|
3988
|
+
enum {is_trivially_copy_assignable = Type::is_trivially_copy_assignable};
|
3989
|
+
# endif
|
3990
|
+
|
3991
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copy_constructible)
|
3992
|
+
enum {is_trivially_copy_constructible = Type::is_trivially_copy_constructible};
|
3993
|
+
# endif
|
3994
|
+
|
3995
|
+
# if Z_TRAIT_HAS(Type, is_trivially_copyable)
|
3996
|
+
enum {is_trivially_copyable = Type::is_trivially_copyable};
|
3997
|
+
# endif
|
3998
|
+
|
3999
|
+
# if Z_TRAIT_HAS(Type, is_trivially_default_constructible)
|
4000
|
+
enum {is_trivially_default_constructible = Type::is_trivially_default_constructible};
|
4001
|
+
# endif
|
4002
|
+
|
4003
|
+
# if Z_TRAIT_HAS(Type, is_trivially_destructible)
|
4004
|
+
enum {is_trivially_destructible = Type::is_trivially_destructible};
|
4005
|
+
# endif
|
4006
|
+
|
4007
|
+
# if Z_TRAIT_HAS(Type, is_uint8)
|
4008
|
+
enum {is_uint8 = Type::is_uint8};
|
4009
|
+
# endif
|
4010
|
+
|
4011
|
+
# if Z_TRAIT_HAS(Type, is_uint16)
|
4012
|
+
enum {is_uint16 = Type::is_uint16};
|
4013
|
+
# endif
|
4014
|
+
|
4015
|
+
# if Z_TRAIT_HAS(Type, is_uint32)
|
4016
|
+
enum {is_uint32 = Type::is_uint32};
|
4017
|
+
# endif
|
4018
|
+
|
4019
|
+
# if Z_TRAIT_HAS(Type, is_uint64)
|
4020
|
+
enum {is_uint64 = Type::is_uint64};
|
4021
|
+
# endif
|
4022
|
+
|
4023
|
+
# if Z_TRAIT_HAS(Type, is_uint128)
|
4024
|
+
enum {is_uint128 = Type::is_uint128};
|
4025
|
+
# endif
|
4026
|
+
|
4027
|
+
# if Z_TRAIT_HAS(Type, is_union)
|
4028
|
+
enum {is_union = Type::is_union};
|
4029
|
+
# endif
|
4030
|
+
|
4031
|
+
/*# if Z_TRAIT_HAS(Type, is_wchar)
|
4032
|
+
enum {is_wchar = Type::is_wchar};
|
4033
|
+
# endif*/
|
4034
|
+
|
4035
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
4036
|
+
|
4037
|
+
enum { is_objective_c_class = Type::is_objective_c_class,
|
4038
|
+
is_objective_c_class_pointer = Type::is_objective_c_class_pointer,
|
4039
|
+
is_objective_c_object = Type::is_objective_c_object,
|
4040
|
+
is_objective_c_object_pointer = Type::is_objective_c_object_pointer
|
4041
|
+
};
|
4042
|
+
|
4043
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
4044
|
+
enum { is_objective_c_instance = Type::is_objective_c_instance,
|
4045
|
+
is_objective_c_instance_pointer = Type::is_objective_c_instance_pointer
|
4046
|
+
};
|
4047
|
+
# endif
|
4048
|
+
|
4049
|
+
# endif
|
4050
|
+
|
4051
|
+
# ifdef Z_LLONG
|
4052
|
+
enum { is_sllong = Type::is_sllong,
|
4053
|
+
is_ullong = Type::is_ullong
|
4054
|
+
};
|
4055
|
+
# endif
|
4056
|
+
|
4057
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
4058
|
+
|
4059
|
+
enum { is_const_lvalue = Type::is_const_lvalue,
|
4060
|
+
is_const_rvalue = Type::is_const_rvalue,
|
4061
|
+
is_const_volatile_lvalue = Type::is_const_volatile_lvalue,
|
4062
|
+
is_const_volatile_rvalue = Type::is_const_volatile_rvalue,
|
4063
|
+
is_lvalue = Type::is_lvalue,
|
4064
|
+
is_rvalue = Type::is_rvalue,
|
4065
|
+
is_volatile_lvalue = Type::is_volatile_lvalue,
|
4066
|
+
is_volatile_rvalue = Type::is_volatile_rvalue
|
4067
|
+
};
|
4068
|
+
|
4069
|
+
typedef typename Type<typename Type::add_const_lvalue >::flow add_const_lvalue;
|
4070
|
+
typedef typename Type<typename Type::add_const_rvalue >::flow add_const_rvalue;
|
4071
|
+
typedef typename Type<typename Type::add_const_volatile_lvalue >::flow add_const_volatile_lvalue;
|
4072
|
+
typedef typename Type<typename Type::add_const_volatile_rvalue >::flow add_const_volatile_rvalue;
|
4073
|
+
typedef typename Type<typename Type::add_lvalue >::flow add_lvalue;
|
4074
|
+
typedef typename Type<typename Type::add_rvalue >::flow add_rvalue;
|
4075
|
+
typedef typename Type<typename Type::add_volatile_lvalue >::flow add_volatile_lvalue;
|
4076
|
+
typedef typename Type<typename Type::add_volatile_rvalue >::flow add_volatile_rvalue;
|
4077
|
+
typedef typename Type<typename Type::remove_const_this >::flow remove_const_this;
|
4078
|
+
typedef typename Type<typename Type::remove_const_volatile_this>::flow remove_const_volatile_this;
|
4079
|
+
typedef typename Type<typename Type::remove_this >::flow remove_this;
|
4080
|
+
typedef typename Type<typename Type::remove_volatile_this >::flow remove_volatile_this;
|
4081
|
+
typedef typename Type<typename Type::to_const_lvalue >::flow to_const_lvalue;
|
4082
|
+
typedef typename Type<typename Type::to_const_rvalue >::flow to_const_rvalue;
|
4083
|
+
typedef typename Type<typename Type::to_const_volatile_lvalue >::flow to_const_volatile_lvalue;
|
4084
|
+
typedef typename Type<typename Type::to_const_volatile_rvalue >::flow to_const_volatile_rvalue;
|
4085
|
+
typedef typename Type<typename Type::to_lvalue >::flow to_lvalue;
|
4086
|
+
typedef typename Type<typename Type::to_rvalue >::flow to_rvalue;
|
4087
|
+
typedef typename Type<typename Type::to_volatile_lvalue >::flow to_volatile_lvalue;
|
4088
|
+
typedef typename Type<typename Type::to_volatile_rvalue >::flow to_volatile_rvalue;
|
4089
|
+
|
4090
|
+
# endif
|
4091
|
+
|
4092
|
+
# if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
4093
|
+
|
4094
|
+
enum { is_function_rvalue_reference = Type::is_function_rvalue_reference,
|
4095
|
+
is_rvalue_reference = Type::is_rvalue_reference
|
4096
|
+
};
|
4097
|
+
|
4098
|
+
typedef typename Type<typename Type::add_rvalue_reference >::flow add_rvalue_reference;
|
4099
|
+
typedef typename Type<typename Type::to_rvalue_reference >::flow to_rvalue_reference;
|
4100
|
+
|
4101
|
+
# endif
|
4102
|
+
|
4103
|
+
# if Z_TRAIT_HAS(Type, parameters)
|
4104
|
+
typedef typename Type::parameters parameters;
|
4105
|
+
# endif
|
4106
|
+
|
4107
|
+
# if Z_TRAIT_HAS(Type, underlying_type)
|
4108
|
+
typedef typename Type<typename Type::underlying_type>::flow underlying_type;
|
4109
|
+
# endif
|
4110
|
+
|
4111
|
+
# if Z_TRAIT_HAS(Type, to_member_pointer)
|
4112
|
+
template <class klass> using to_member_pointer = typename Type<typename Type::to_member_pointer<klass> >::flow;
|
4113
|
+
# endif
|
4114
|
+
|
4115
|
+
Z_IMPLEMENTATION_MEMBER_FUNCTIONS
|
4116
|
+
};
|
4117
|
+
|
4118
|
+
# undef Z_IMPLEMENTATION_MEMBER_FUNCTIONS
|
4119
|
+
};
|
4120
|
+
|
4121
|
+
template <class T> struct TypeArity {enum {value = Type<T>::arity };};
|
4122
|
+
template <class T> struct TypeBits {enum {value = Type<T>::bits };};
|
4123
|
+
template <class T> struct TypeElementCount {enum {value = Type<T>::element_count };};
|
4124
|
+
template <class T> struct TypeIsArithmetic {enum {value = Type<T>::is_arithmetic };};
|
4125
|
+
template <class T> struct TypeIsArray {enum {value = Type<T>::is_array };};
|
4126
|
+
template <class T> struct TypeIsCallable {enum {value = Type<T>::is_callable };};
|
4127
|
+
template <class T> struct TypeIsChar {enum {value = Type<T>::is_char };};
|
4128
|
+
template <class T> struct TypeIsClass {enum {value = Type<T>::is_class };};
|
4129
|
+
template <class T> struct TypeIsConst {enum {value = Type<T>::is_const };};
|
4130
|
+
template <class T> struct TypeIsConstVolatile {enum {value = Type<T>::is_const_volatile };};
|
4131
|
+
template <class T> struct TypeIsDataMemberPointer {enum {value = Type<T>::is_data_member_pointer };};
|
4132
|
+
template <class T> struct TypeIsEmpty {enum {value = Type<T>::is_empty };};
|
4133
|
+
template <class T> struct TypeIsExact {enum {value = Type<T>::is_exact };};
|
4134
|
+
template <class T> struct TypeIsInteger {enum {value = Type<T>::is_integer };};
|
4135
|
+
template <class T> struct TypeIsIntegral {enum {value = Type<T>::is_integral };};
|
4136
|
+
template <class T> struct TypeIsFlexibleArray {enum {value = Type<T>::is_flexible_array };};
|
4137
|
+
template <class T> struct TypeIsFunction {enum {value = Type<T>::is_function };};
|
4138
|
+
template <class T> struct TypeIsFunctionLValueReference {enum {value = Type<T>::is_function_lvalue_reference};};
|
4139
|
+
template <class T> struct TypeIsFunctionPointer {enum {value = Type<T>::is_function_pointer };};
|
4140
|
+
template <class T> struct TypeIsFunctionReference {enum {value = Type<T>::is_function_reference };};
|
4141
|
+
template <class T> struct TypeIsFundamental {enum {value = Type<T>::is_fundamental };};
|
4142
|
+
template <class T> struct TypeIsLValueReference {enum {value = Type<T>::is_lvalue_reference };};
|
4143
|
+
template <class T> struct TypeIsMemberFunctionPointer {enum {value = Type<T>::is_member_function_pointer };};
|
4144
|
+
template <class T> struct TypeIsMemberPointer {enum {value = Type<T>::is_member_pointer };};
|
4145
|
+
template <class T> struct TypeIsNaT {enum {value = Type<T>::is_nat };};
|
4146
|
+
template <class T> struct TypeIsNatural {enum {value = Type<T>::is_natural };};
|
4147
|
+
template <class T> struct TypeIsNumber {enum {value = Type<T>::is_number };};
|
4148
|
+
template <class T> struct TypeIsPointer {enum {value = Type<T>::is_pointer };};
|
4149
|
+
template <class T> struct TypeIsQualified {enum {value = Type<T>::is_qualified };};
|
4150
|
+
template <class T> struct TypeIsReal {enum {value = Type<T>::is_real };};
|
4151
|
+
template <class T> struct TypeIsReference {enum {value = Type<T>::is_reference };};
|
4152
|
+
template <class T> struct TypeIsScalar {enum {value = Type<T>::is_scalar };};
|
4153
|
+
template <class T> struct TypeIsSChar {enum {value = Type<T>::is_schar };};
|
4154
|
+
template <class T> struct TypeIsSigned {enum {value = Type<T>::is_signed };};
|
4155
|
+
template <class T> struct TypeIsSignedOrUnsigned {enum {value = Type<T>::is_signed_or_unsigned };};
|
4156
|
+
template <class T> struct TypeIsSimple {enum {value = Type<T>::is_simple };};
|
4157
|
+
template <class T> struct TypeIsSInt {enum {value = Type<T>::is_sint };};
|
4158
|
+
template <class T> struct TypeIsSLong {enum {value = Type<T>::is_slong };};
|
4159
|
+
template <class T> struct TypeIsSShort {enum {value = Type<T>::is_sshort };};
|
4160
|
+
template <class T> struct TypeIsStaticallyAllocatable {enum {value = Type<T>::is_statically_allocatable };};
|
4161
|
+
template <class T> struct TypeIsStorable {enum {value = Type<T>::is_storable };};
|
4162
|
+
template <class T> struct TypeIsStructure {enum {value = Type<T>::is_structure };};
|
4163
|
+
template <class T> struct TypeIsStructureOrUnion {enum {value = Type<T>::is_structure_or_union };};
|
4164
|
+
template <class T> struct TypeIsUChar {enum {value = Type<T>::is_uchar };};
|
4165
|
+
template <class T> struct TypeIsUInt {enum {value = Type<T>::is_uint };};
|
4166
|
+
template <class T> struct TypeIsULong {enum {value = Type<T>::is_ulong };};
|
4167
|
+
template <class T> struct TypeIsUnsigned {enum {value = Type<T>::is_unsigned };};
|
4168
|
+
template <class T> struct TypeIsUShort {enum {value = Type<T>::is_ushort };};
|
4169
|
+
template <class T> struct TypeIsValid {enum {value = Type<T>::is_valid };};
|
4170
|
+
template <class T> struct TypeIsVariadic {enum {value = Type<T>::is_variadic };};
|
4171
|
+
template <class T> struct TypeIsVariadicFunction {enum {value = Type<T>::is_variadic_function };};
|
4172
|
+
template <class T> struct TypeIsVoid {enum {value = Type<T>::is_void };};
|
4173
|
+
template <class T> struct TypeIsVoidPointer {enum {value = Type<T>::is_void_pointer };};
|
4174
|
+
template <class T> struct TypeIsVolatile {enum {value = Type<T>::is_volatile };};
|
4175
|
+
template <class T> struct TypePointerLevel {enum {value = Type<T>::pointer_level };};
|
4176
|
+
template <class T> struct TypeSize {enum {value = Type<T>::size };};
|
4177
|
+
|
4178
|
+
template <class T> struct TypeAddConst {typedef typename Type<T>::add_const type;};
|
4179
|
+
template <class T> struct TypeAddConstVolatile {typedef typename Type<T>::add_const_volatile type;};
|
4180
|
+
template <class T> struct TypeAddLValueReference {typedef typename Type<T>::add_lvalue_reference type;};
|
4181
|
+
template <class T> struct TypeAddPointer {typedef typename Type<T>::add_pointer type;};
|
4182
|
+
template <class T> struct TypeAddVolatile {typedef typename Type<T>::add_volatile type;};
|
4183
|
+
template <class T> struct TypeClassType {typedef typename Type<T>::class_type type;};
|
4184
|
+
template <class T> struct TypeElementType {typedef typename Type<T>::element_type type;};
|
4185
|
+
template <class T> struct TypePointeeType {typedef typename Type<T>::pointee_type type;};
|
4186
|
+
template <class T> struct TypeReferenceeType {typedef typename Type<T>::referencee_type type;};
|
4187
|
+
template <class T> struct TypeRemoveConst {typedef typename Type<T>::remove_const type;};
|
4188
|
+
template <class T> struct TypeRemoveConstVolatile {typedef typename Type<T>::remove_const_volatile type;};
|
4189
|
+
template <class T> struct TypeRemovePointer {typedef typename Type<T>::remove_pointer type;};
|
4190
|
+
template <class T> struct TypeRemoveReference {typedef typename Type<T>::remove_reference type;};
|
4191
|
+
template <class T> struct TypeRemoveVolatile {typedef typename Type<T>::remove_volatile type;};
|
4192
|
+
template <class T> struct TypeReturnType {typedef typename Type<T>::return_type type;};
|
4193
|
+
template <class T> struct TypeToConst {typedef typename Type<T>::to_const type;};
|
4194
|
+
template <class T> struct TypeToConstVolatile {typedef typename Type<T>::to_const_volatile type;};
|
4195
|
+
template <class T> struct TypeToForwardable {typedef typename Type<T>::to_forwardable type;};
|
4196
|
+
template <class T> struct TypeToFunction {typedef typename Type<T>::to_function type;};
|
4197
|
+
template <class T> struct TypeToLValueReference {typedef typename Type<T>::to_lvalue_reference type;};
|
4198
|
+
template <class T> struct TypeToOpaque {typedef typename Type<T>::to_opaque type;};
|
4199
|
+
template <class T> struct TypeToPointer {typedef typename Type<T>::to_pointer type;};
|
4200
|
+
template <class T> struct TypeToSigned {typedef typename Type<T>::to_signed type;};
|
4201
|
+
template <class T> struct TypeToUnqualified {typedef typename Type<T>::to_unqualified type;};
|
4202
|
+
template <class T> struct TypeToUnsigned {typedef typename Type<T>::to_unsigned type;};
|
4203
|
+
template <class T> struct TypeToVolatile {typedef typename Type<T>::to_volatile type;};
|
4204
|
+
template <class T> struct TypeToWrap {typedef typename Type<T>::to_wrap type;};
|
4205
|
+
|
4206
|
+
# if Z_HAS_TRAIT(TypeHasVirtualDestructor)
|
4207
|
+
template <class T> struct TypeHasVirtualDestructor {enum {value = Type<T>::has_virtual_destructor};};
|
4208
|
+
# endif
|
4209
|
+
|
4210
|
+
# if Z_HAS_TRAIT(TypeIsAbstract)
|
4211
|
+
template <class T> struct TypeIsAbstract {enum {value = Type<T>::is_abstract};};
|
4212
|
+
# endif
|
4213
|
+
|
4214
|
+
# if Z_HAS_TRAIT(TypeIsAggregate)
|
4215
|
+
template <class T> struct TypeIsAggregate {enum {value = Type<T>::is_aggregate};};
|
4216
|
+
# endif
|
4217
|
+
|
4218
|
+
# if Z_HAS_TRAIT(TypeIsBoolean)
|
4219
|
+
template <class T> struct TypeIsBoolean {enum {value = Type<T>::is_boolean};};
|
4220
|
+
# endif
|
4221
|
+
|
4222
|
+
/*# if Z_HAS_TRAIT(TypeIsChar16)
|
4223
|
+
template <class T> struct TypeIsChar16 {enum {value = Type<T>::is_char16};};
|
4224
|
+
# endif
|
4225
|
+
|
4226
|
+
# if Z_HAS_TRAIT(TypeIsChar32)
|
4227
|
+
template <class T> struct TypeIsChar32 {enum {value = Type<T>::is_char32};};
|
4228
|
+
# endif*/
|
4229
|
+
|
4230
|
+
# if Z_HAS_TRAIT(TypeIsDefaultConstructible)
|
4231
|
+
template <class T> struct TypeIsDefaultConstructible {enum {value = Type<T>::is_default_constructible};};
|
4232
|
+
# endif
|
4233
|
+
|
4234
|
+
# if Z_HAS_TRAIT(TypeIsDouble)
|
4235
|
+
template <class T> struct TypeIsDouble {enum {value = Type<T>::is_double};};
|
4236
|
+
# endif
|
4237
|
+
|
4238
|
+
# if Z_HAS_TRAIT(TypeIsEnumeration)
|
4239
|
+
template <class T> struct TypeIsEnumeration {enum {value = Type<T>::is_enumeration};};
|
4240
|
+
# endif
|
4241
|
+
|
4242
|
+
# if Z_HAS_TRAIT(TypeIsFinal)
|
4243
|
+
template <class T> struct TypeIsFinal {enum {value = Type<T>::is_final};};
|
4244
|
+
# endif
|
4245
|
+
|
4246
|
+
# if Z_HAS_TRAIT(TypeIsFloat)
|
4247
|
+
template <class T> struct TypeIsFloat {enum {value = Type<T>::is_float};};
|
4248
|
+
# endif
|
4249
|
+
|
4250
|
+
# if Z_HAS_TRAIT(TypeIsFloat16)
|
4251
|
+
template <class T> struct TypeIsFloat16 {enum {value = Type<T>::is_float16};};
|
4252
|
+
# endif
|
4253
|
+
|
4254
|
+
# if Z_HAS_TRAIT(TypeIsFloat32)
|
4255
|
+
template <class T> struct TypeIsFloat32 {enum {value = Type<T>::is_float32};};
|
4256
|
+
# endif
|
4257
|
+
|
4258
|
+
# if Z_HAS_TRAIT(TypeIsFloat64)
|
4259
|
+
template <class T> struct TypeIsFloat64 {enum {value = Type<T>::is_float64};};
|
4260
|
+
# endif
|
4261
|
+
|
4262
|
+
# if Z_HAS_TRAIT(TypeIsFloat128)
|
4263
|
+
template <class T> struct TypeIsFloat128 {enum {value = Type<T>::is_float128};};
|
4264
|
+
# endif
|
4265
|
+
|
4266
|
+
# if Z_HAS_TRAIT(TypeIsFloat80_x87)
|
4267
|
+
template <class T> struct TypeIsFloat80_x87 {enum {value = Type<T>::is_float80_x87};};
|
4268
|
+
# endif
|
4269
|
+
|
4270
|
+
# if Z_HAS_TRAIT(TypeIsFloat96_x87)
|
4271
|
+
template <class T> struct TypeIsFloat96_x87 {enum {value = Type<T>::is_float96_x87};};
|
4272
|
+
# endif
|
4273
|
+
|
4274
|
+
# if Z_HAS_TRAIT(TypeIsFloat128_x87)
|
4275
|
+
template <class T> struct TypeIsFloat128_x87 {enum {value = Type<T>::is_float128_x87};};
|
4276
|
+
# endif
|
4277
|
+
|
4278
|
+
# if Z_HAS_TRAIT(TypeIsInterfaceClass)
|
4279
|
+
template <class T> struct TypeIsInterfaceClass {enum {value = Type<T>::is_interface_class};};
|
4280
|
+
# endif
|
4281
|
+
|
4282
|
+
# if Z_HAS_TRAIT(TypeIsLDouble)
|
4283
|
+
template <class T> struct TypeIsLDouble {enum {value = Type<T>::is_ldouble};};
|
4284
|
+
# endif
|
4285
|
+
|
4286
|
+
# if Z_HAS_TRAIT(TypeIsLiteral)
|
4287
|
+
template <class T> struct TypeIsLiteral {enum {value = Type<T>::is_literal};};
|
4288
|
+
# endif
|
4289
|
+
|
4290
|
+
# if Z_HAS_TRAIT(TypeIsNullPointer)
|
4291
|
+
template <class T> struct TypeIsNullPointer {enum {value = Type<T>::is_null_pointer};};
|
4292
|
+
# endif
|
4293
|
+
|
4294
|
+
# if Z_HAS_TRAIT(TypeIsPOD)
|
4295
|
+
template <class T> struct TypeIsPOD {enum {value = Type<T>::is_pod};};
|
4296
|
+
# endif
|
4297
|
+
|
4298
|
+
# if Z_HAS_TRAIT(TypeIsPolymorphic)
|
4299
|
+
template <class T> struct TypeIsPolymorphic {enum {value = Type<T>::is_polymorphic};};
|
4300
|
+
# endif
|
4301
|
+
|
4302
|
+
# if Z_HAS_TRAIT(TypeIsSInt8)
|
4303
|
+
template <class T> struct TypeIsSInt8 {enum {value = Type<T>::is_sint8};};
|
4304
|
+
# endif
|
4305
|
+
|
4306
|
+
# if Z_HAS_TRAIT(TypeIsSInt16)
|
4307
|
+
template <class T> struct TypeIsSInt16 {enum {value = Type<T>::is_sint16};};
|
4308
|
+
# endif
|
4309
|
+
|
4310
|
+
# if Z_HAS_TRAIT(TypeIsSInt32)
|
4311
|
+
template <class T> struct TypeIsSInt32 {enum {value = Type<T>::is_sint32};};
|
4312
|
+
# endif
|
4313
|
+
|
4314
|
+
# if Z_HAS_TRAIT(TypeIsSInt64)
|
4315
|
+
template <class T> struct TypeIsSInt64 {enum {value = Type<T>::is_sint64};};
|
4316
|
+
# endif
|
4317
|
+
|
4318
|
+
# if Z_HAS_TRAIT(TypeIsSInt128)
|
4319
|
+
template <class T> struct TypeIsSInt128 {enum {value = Type<T>::is_sint128};};
|
4320
|
+
# endif
|
4321
|
+
|
4322
|
+
# if Z_HAS_TRAIT(TypeIsTemplate)
|
4323
|
+
template <class T> struct TypeIsTemplate {enum {value = Type<T>::is_template};};
|
4324
|
+
# endif
|
4325
|
+
|
4326
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyCopyAssignable)
|
4327
|
+
template <class T> struct TypeIsTriviallyCopyAssignable {enum {value = Type<T>::is_trivially_copy_assignable};};
|
4328
|
+
# endif
|
4329
|
+
|
4330
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyCopyConstructible)
|
4331
|
+
template <class T> struct TypeIsTriviallyCopyConstructible {enum {value = Type<T>::is_trivially_copy_constructible};};
|
4332
|
+
# endif
|
4333
|
+
|
4334
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyCopyable)
|
4335
|
+
template <class T> struct TypeIsTriviallyCopyable {enum {value = Type<T>::is_trivially_copyable};};
|
4336
|
+
# endif
|
4337
|
+
|
4338
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyDefaultConstructible)
|
4339
|
+
template <class T> struct TypeIsTriviallyDefaultConstructible {enum {value = Type<T>::is_trivially_default_constructible};};
|
4340
|
+
# endif
|
4341
|
+
|
4342
|
+
# if Z_HAS_TRAIT(TypeIsTriviallyDestructible)
|
4343
|
+
template <class T> struct TypeIsTriviallyDestructible {enum {value = Type<T>::is_trivially_destructible};};
|
4344
|
+
# endif
|
4345
|
+
|
4346
|
+
# if Z_HAS_TRAIT(TypeIsUInt8)
|
4347
|
+
template <class T> struct TypeIsUInt8 {enum {value = Type<T>::is_uint8};};
|
4348
|
+
# endif
|
4349
|
+
|
4350
|
+
# if Z_HAS_TRAIT(TypeIsUInt16)
|
4351
|
+
template <class T> struct TypeIsUInt16 {enum {value = Type<T>::is_uint16};};
|
4352
|
+
# endif
|
4353
|
+
|
4354
|
+
# if Z_HAS_TRAIT(TypeIsUInt32)
|
4355
|
+
template <class T> struct TypeIsUInt32 {enum {value = Type<T>::is_uint32};};
|
4356
|
+
# endif
|
4357
|
+
|
4358
|
+
# if Z_HAS_TRAIT(TypeIsUInt64)
|
4359
|
+
template <class T> struct TypeIsUInt64 {enum {value = Type<T>::is_uint64};};
|
4360
|
+
# endif
|
4361
|
+
|
4362
|
+
# if Z_HAS_TRAIT(TypeIsUInt128)
|
4363
|
+
template <class T> struct TypeIsUInt128 {enum {value = Type<T>::is_uint128};};
|
4364
|
+
# endif
|
4365
|
+
|
4366
|
+
# if Z_HAS_TRAIT(TypeIsUnion)
|
4367
|
+
template <class T> struct TypeIsUnion {enum {value = Type<T>::is_union};};
|
4368
|
+
# endif
|
4369
|
+
|
4370
|
+
/*# if Z_HAS_TRAIT(TypeIsWChar)
|
4371
|
+
template <class T> struct TypeIsWChar {enum {value = Type<T>::is_wchar};};
|
4372
|
+
# endif*/
|
4373
|
+
|
4374
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
4375
|
+
|
4376
|
+
template <class T> struct TypeIsObjectiveCClass {enum {value = Type<T>::is_objective_c_class };};
|
4377
|
+
template <class T> struct TypeIsObjectiveCClassPointer {enum {value = Type<T>::is_objective_c_class_pointer };};
|
4378
|
+
template <class T> struct TypeIsObjectiveCObject {enum {value = Type<T>::is_objective_c_object };};
|
4379
|
+
template <class T> struct TypeIsObjectiveCObjectPointer {enum {value = Type<T>::is_objective_c_object_pointer};};
|
4380
|
+
|
4381
|
+
# if Z_LANGUAGE_HAS(CPP, EXPRESSION_SFINAE)
|
4382
|
+
template <class T> struct TypeIsObjectiveCInstance {enum {value = Type<T>::is_objective_c_instance };};
|
4383
|
+
template <class T> struct TypeIsObjectiveCInstancePointer {enum {value = Type<T>::is_objective_c_instance_pointer};};
|
4384
|
+
# endif
|
4385
|
+
|
4386
|
+
# endif
|
4387
|
+
|
4388
|
+
# ifdef Z_LLONG
|
4389
|
+
template <class T> struct TypeIsSLLong {enum {value = Type<T>::is_sllong};};
|
4390
|
+
template <class T> struct TypeIsULLong {enum {value = Type<T>::is_ullong};};
|
4391
|
+
# endif
|
4392
|
+
|
4393
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
4394
|
+
|
4395
|
+
template <class T> struct TypeIsConstLValue {enum {value = Type<T>::is_const_lvalue };};
|
4396
|
+
template <class T> struct TypeIsConstRValue {enum {value = Type<T>::is_const_rvalue };};
|
4397
|
+
template <class T> struct TypeIsConstVolatileLValue {enum {value = Type<T>::is_const_volatile_lvalue};};
|
4398
|
+
template <class T> struct TypeIsConstVolatileRValue {enum {value = Type<T>::is_const_volatile_rvalue};};
|
4399
|
+
template <class T> struct TypeIsLValue {enum {value = Type<T>::is_lvalue };};
|
4400
|
+
template <class T> struct TypeIsRValue {enum {value = Type<T>::is_rvalue };};
|
4401
|
+
template <class T> struct TypeIsVolatileLValue {enum {value = Type<T>::is_volatile_lvalue };};
|
4402
|
+
template <class T> struct TypeIsVolatileRValue {enum {value = Type<T>::is_volatile_rvalue };};
|
4403
|
+
|
4404
|
+
template <class T> struct TypeAddConstLValue {typedef typename Type<T>::add_const_lvalue type;};
|
4405
|
+
template <class T> struct TypeAddConstRValue {typedef typename Type<T>::add_const_rvalue type;};
|
4406
|
+
template <class T> struct TypeAddConstVolatileLValue {typedef typename Type<T>::add_const_volatile_lvalue type;};
|
4407
|
+
template <class T> struct TypeAddConstVolatileRValue {typedef typename Type<T>::add_const_volatile_rvalue type;};
|
4408
|
+
template <class T> struct TypeAddLValue {typedef typename Type<T>::add_lvalue type;};
|
4409
|
+
template <class T> struct TypeAddRValue {typedef typename Type<T>::add_rvalue type;};
|
4410
|
+
template <class T> struct TypeAddVolatileLValue {typedef typename Type<T>::add_volatile_lvalue type;};
|
4411
|
+
template <class T> struct TypeAddVolatileRValue {typedef typename Type<T>::add_volatile_rvalue type;};
|
4412
|
+
template <class T> struct TypeRemoveConstThis {typedef typename Type<T>::remove_const_this type;};
|
4413
|
+
template <class T> struct TypeRemoveConstVolatileThis {typedef typename Type<T>::remove_const_volatile_this type;};
|
4414
|
+
template <class T> struct TypeRemoveThis {typedef typename Type<T>::remove_this type;};
|
4415
|
+
template <class T> struct TypeRemoveVolatileThis {typedef typename Type<T>::remove_volatile_this type;};
|
4416
|
+
template <class T> struct TypeToConstLValue {typedef typename Type<T>::to_const_lvalue type;};
|
4417
|
+
template <class T> struct TypeToConstRValue {typedef typename Type<T>::to_const_rvalue type;};
|
4418
|
+
template <class T> struct TypeToConstVolatileLValue {typedef typename Type<T>::to_const_volatile_lvalue type;};
|
4419
|
+
template <class T> struct TypeToConstVolatileRValue {typedef typename Type<T>::to_const_volatile_rvalue type;};
|
4420
|
+
template <class T> struct TypeToLValue {typedef typename Type<T>::to_lvalue type;};
|
4421
|
+
template <class T> struct TypeToRValue {typedef typename Type<T>::to_rvalue type;};
|
4422
|
+
template <class T> struct TypeToVolatileLValue {typedef typename Type<T>::to_volatile_lvalue type;};
|
4423
|
+
template <class T> struct TypeToVolatileRValue {typedef typename Type<T>::to_volatile_rvalue type;};
|
4424
|
+
|
4425
|
+
# endif
|
4426
|
+
|
4427
|
+
# if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
4428
|
+
|
4429
|
+
template <class T> struct TypeIsFunctionRValueReference {enum {value = Type<T>::is_function_rvalue_reference};};
|
4430
|
+
template <class T> struct TypeIsRValueReference {enum {value = Type<T>::is_rvalue_reference };};
|
4431
|
+
|
4432
|
+
template <class T> struct TypeAddRValueReference {typedef typename Type<T>::add_rvalue_reference type;};
|
4433
|
+
template <class T> struct TypeToRValueReference {typedef typename Type<T>::to_rvalue_reference type;};
|
4434
|
+
|
4435
|
+
# endif
|
4436
|
+
|
4437
|
+
# if Z_HAS_TRAIT(TypeParameters)
|
4438
|
+
template <class T> struct TypeParameters {typedef typename Type<T>::parameters type;};
|
4439
|
+
# endif
|
4440
|
+
|
4441
|
+
# if Z_HAS_TRAIT(TypeUnderlyingType)
|
4442
|
+
template <class T> struct TypeUnderlyingType {typedef typename Type<T>::underlying_type type;};
|
4443
|
+
# endif
|
4444
|
+
|
4445
|
+
# if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS)
|
4446
|
+
|
4447
|
+
template <class T> using type_add_const = typename Type<T>::add_const;
|
4448
|
+
template <class T> using type_add_const_volatile = typename Type<T>::add_const_volatile;
|
4449
|
+
template <class T> using type_add_lvalue_reference = typename Type<T>::add_lvalue_reference;
|
4450
|
+
template <class T> using type_add_pointer = typename Type<T>::add_pointer;
|
4451
|
+
template <class T> using type_add_volatile = typename Type<T>::add_volatile;
|
4452
|
+
template <class T> using type_class_type = typename Type<T>::class_type;
|
4453
|
+
template <class T> using type_element_type = typename Type<T>::element_type;
|
4454
|
+
template <class T> using type_pointee_type = typename Type<T>::pointee_type;
|
4455
|
+
template <class T> using type_referencee_type = typename Type<T>::referencee_type;
|
4456
|
+
template <class T> using type_remove_const = typename Type<T>::remove_const;
|
4457
|
+
template <class T> using type_remove_const_volatile = typename Type<T>::remove_const_volatile;
|
4458
|
+
template <class T> using type_remove_pointer = typename Type<T>::remove_pointer;
|
4459
|
+
template <class T> using type_remove_reference = typename Type<T>::remove_reference;
|
4460
|
+
template <class T> using type_remove_volatile = typename Type<T>::remove_volatile;
|
4461
|
+
template <class T> using type_return_type = typename Type<T>::return_type;
|
4462
|
+
template <class T> using type_to_const = typename Type<T>::to_const;
|
4463
|
+
template <class T> using type_to_const_volatile = typename Type<T>::to_const_volatile;
|
4464
|
+
template <class T> using type_to_forwardable = typename Type<T>::to_forwardable;
|
4465
|
+
template <class T> using type_to_function = typename Type<T>::to_function;
|
4466
|
+
template <class T> using type_to_lvalue_reference = typename Type<T>::to_lvalue_reference;
|
4467
|
+
template <class T> using type_to_opaque = typename Type<T>::to_opaque;
|
4468
|
+
template <class T> using type_to_pointer = typename Type<T>::to_pointer;
|
4469
|
+
template <class T> using type_to_signed = typename Type<T>::to_signed;
|
4470
|
+
template <class T> using type_to_unqualified = typename Type<T>::to_unqualified;
|
4471
|
+
template <class T> using type_to_unsigned = typename Type<T>::to_unsigned;
|
4472
|
+
template <class T> using type_to_volatile = typename Type<T>::to_volatile;
|
4473
|
+
template <class T> using type_to_wrap = typename Type<T>::to_wrap;
|
4474
|
+
|
4475
|
+
template <class T, class klass> using type_to_member_pointer = typename TypeToMemberPointer<T, klass>::type;
|
4476
|
+
|
4477
|
+
# if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
|
4478
|
+
template <class T> using type_add_const_lvalue = typename Type<T>::add_const_lvalue;
|
4479
|
+
template <class T> using type_add_const_rvalue = typename Type<T>::add_const_rvalue;
|
4480
|
+
template <class T> using type_add_const_volatile_lvalue = typename Type<T>::add_const_volatile_lvalue;
|
4481
|
+
template <class T> using type_add_const_volatile_rvalue = typename Type<T>::add_const_volatile_rvalue;
|
4482
|
+
template <class T> using type_add_lvalue = typename Type<T>::add_lvalue;
|
4483
|
+
template <class T> using type_add_rvalue = typename Type<T>::add_rvalue;
|
4484
|
+
template <class T> using type_add_volatile_lvalue = typename Type<T>::add_volatile_lvalue;
|
4485
|
+
template <class T> using type_add_volatile_rvalue = typename Type<T>::add_volatile_rvalue;
|
4486
|
+
template <class T> using type_remove_const_this = typename Type<T>::remove_const_this;
|
4487
|
+
template <class T> using type_remove_const_volatile_this = typename Type<T>::remove_const_volatile_this;
|
4488
|
+
template <class T> using type_remove_this = typename Type<T>::remove_this;
|
4489
|
+
template <class T> using type_remove_volatile_this = typename Type<T>::remove_volatile_this;
|
4490
|
+
template <class T> using type_to_const_lvalue = typename Type<T>::to_const_lvalue;
|
4491
|
+
template <class T> using type_to_const_rvalue = typename Type<T>::to_const_rvalue;
|
4492
|
+
template <class T> using type_to_const_volatile_lvalue = typename Type<T>::to_const_volatile_lvalue;
|
4493
|
+
template <class T> using type_to_const_volatile_rvalue = typename Type<T>::to_const_volatile_rvalue;
|
4494
|
+
template <class T> using type_to_lvalue = typename Type<T>::to_lvalue;
|
4495
|
+
template <class T> using type_to_rvalue = typename Type<T>::to_rvalue;
|
4496
|
+
template <class T> using type_to_volatile_lvalue = typename Type<T>::to_volatile_lvalue;
|
4497
|
+
template <class T> using type_to_volatile_rvalue = typename Type<T>::to_volatile_rvalue;
|
4498
|
+
# endif
|
4499
|
+
|
4500
|
+
# if Z_LANGUAGE_HAS(CPP, RVALUE_REFERENCE)
|
4501
|
+
template <class T> using type_add_rvalue_reference = typename Type<T>::add_rvalue_reference;
|
4502
|
+
template <class T> using type_to_rvalue_reference = typename Type<T>::to_rvalue_reference;
|
4503
|
+
# endif
|
4504
|
+
|
4505
|
+
# if Z_HAS_TRAIT_ALIAS(type_parameters)
|
4506
|
+
template <class T> using type_parameters = typename Type<T>::parameters;
|
4507
|
+
# endif
|
4508
|
+
|
4509
|
+
# if Z_HAS_TRAIT_ALIAS(type_underlying_type)
|
4510
|
+
template <class T> using type_underlying_type = typename Type<T>::underlying_type;
|
4511
|
+
# endif
|
4512
|
+
|
4513
|
+
# endif
|
4514
|
+
}
|
4515
|
+
|
4516
|
+
#endif // _Z_traits_Type_HPP_
|