digitalmars.D.learn - how do I activate contracts for phobos functions in dmd
- Richard Palme (5/5) Nov 02 2018 My guess is that I have to build phobos with:
- Stefan Koch (3/8) Nov 02 2018 Which phobos functions are used in dmd?
- Richard Palme (14/16) Nov 02 2018 I think I didn't phrase the title correctly:
- Kagamin (2/2) Nov 03 2018 Just compile the needed module directly:
My guess is that I have to build phobos with: $make -f posix.mak BUILD=debug but then what do I do next? I'm using Linux and I built dmd+phobos manually by following this guide: https://wiki.dlang.org/Building_under_Posix
Nov 02 2018
On Friday, 2 November 2018 at 14:10:35 UTC, Richard Palme wrote:My guess is that I have to build phobos with: $make -f posix.mak BUILD=debug but then what do I do next? I'm using Linux and I built dmd+phobos manually by following this guide: https://wiki.dlang.org/Building_under_PosixWhich phobos functions are used in dmd? there _should_ be none!
Nov 02 2018
On Friday, 2 November 2018 at 16:41:32 UTC, Stefan Koch wrote:Which phobos functions are used in dmd? there _should_ be none!I think I didn't phrase the title correctly: I'm using dmd as compiler and want to activate the contracts of phobos functions. For example there's a phobos function std.bitmanip.opIndex implemented like this: bool opIndex(size_t i) const nogc pure nothrow in { assert(i < _len); } do { return cast(bool) bt(_ptr, i); } and when I call this function from my code I want the pre contract to be checked (assert(i < _len)
Nov 02 2018
Just compile the needed module directly: dmd myapp.d src/std/bitmanip.d
Nov 03 2018