On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin wrote:
Hello!
We need some conditional compilation using 'version'.
Say we have some code to be compiled for X86 and X86_64.
How can we do that using predefined (or other) versions?
Examples:
version(X86 || X86_64) // failed
On Tuesday, October 31, 2017 20:36:57 Jacob Carlborg via Digitalmars-d-learn
wrote:
> On 2017-10-31 16:36, Dr. Assembly wrote:
> > thanks. I just find it werid, maybe because I came from C/C++
> > background, where it means only integer types. So enum s = "foo"; is
> > really werid. But I'll get
On Tuesday, 31 October 2017 at 13:55:56 UTC, Igor Shirkalin wrote:
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg
wrote:
On 2017-10-31 14:46, Igor Shirkalin wrote:
Hello!
We need some conditional compilation using 'version'.
Say we have some code to be compiled for X86 and
On 2017-10-31 16:36, Dr. Assembly wrote:
thanks. I just find it werid, maybe because I came from C/C++
background, where it means only integer types. So enum s = "foo"; is
really werid. But I'll get used to it.
Think of it more like #define in C/C++ than "const". The above defines a
On Tuesday, 31 October 2017 at 15:19:49 UTC, Steven Schveighoffer
wrote:
On 10/31/17 10:47 AM, Igor Shirkalin wrote:
[...]
Sorry I hate writing code on mobile.
You can create an arbitrary version by assigning a symbol to
it, use that symbol to describe a feature, assign that symbol
for
On Tuesday, 31 October 2017 at 15:20:31 UTC, Igor Shirkalin wrote:
On Tuesday, 31 October 2017 at 14:54:27 UTC, Dr. Assembly wrote:
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg
wrote:
On 2017-10-31 14:46, Igor Shirkalin wrote:
[...]
The only alternative is to do something
On Tuesday, 31 October 2017 at 14:54:27 UTC, Dr. Assembly wrote:
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg
wrote:
On 2017-10-31 14:46, Igor Shirkalin wrote:
[...]
The only alternative is to do something like this:
version (X86)
enum x86 = true;
else
enum x86 =
On 10/31/17 10:47 AM, Igor Shirkalin wrote:
On Tuesday, 31 October 2017 at 14:31:17 UTC, Jesse Phillips wrote:
On Tuesday, 31 October 2017 at 14:25:19 UTC, Igor Shirkalin wrote:
On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips wrote:
On Tuesday, 31 October 2017 at 13:46:40 UTC,
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote:
On 2017-10-31 14:46, Igor Shirkalin wrote:
Hello!
We need some conditional compilation using 'version'.
Say we have some code to be compiled for X86 and X86_64.
How can we do that using predefined (or other) versions?
Examples:
On Tuesday, 31 October 2017 at 14:31:17 UTC, Jesse Phillips wrote:
On Tuesday, 31 October 2017 at 14:25:19 UTC, Igor Shirkalin
wrote:
On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips
wrote:
On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin
wrote:
Hello!
You goal should
On Tuesday, 31 October 2017 at 14:25:19 UTC, Igor Shirkalin wrote:
On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips
wrote:
On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin
wrote:
Hello!
You goal should be to describe features.
Version x86
... Version = I can stand on
On Tuesday, 31 October 2017 at 14:22:37 UTC, Jesse Phillips wrote:
On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin
wrote:
Hello!
You goal should be to describe features.
Version x86
... Version = I can stand on my head
...
pardon?
On Tuesday, 31 October 2017 at 13:46:40 UTC, Igor Shirkalin wrote:
Hello!
You goal should be to describe features.
Version x86
... Version = I can stand on my head
...
On Tuesday, 31 October 2017 at 13:53:54 UTC, Jacob Carlborg wrote:
On 2017-10-31 14:46, Igor Shirkalin wrote:
Hello!
We need some conditional compilation using 'version'.
Say we have some code to be compiled for X86 and X86_64.
How can we do that using predefined (or other) versions?
Examples:
On 2017-10-31 14:46, Igor Shirkalin wrote:
Hello!
We need some conditional compilation using 'version'.
Say we have some code to be compiled for X86 and X86_64.
How can we do that using predefined (or other) versions?
Examples:
version(X86 || X86_64) // failed
version(X86) ||
Hello!
We need some conditional compilation using 'version'.
Say we have some code to be compiled for X86 and X86_64.
How can we do that using predefined (or other) versions?
Examples:
version(X86 || X86_64) // failed
version(X86) || version(X86_64) // failed
The following works but it
16 matches
Mail list logo