On 01/24/2016 10:37 PM, Enjoys Math wrote:
> class V(T) {
> public:
> this() {}
> V opIndex(size_t i, size_t j) {
> writeln("Hello, foo!");
> return this;
> }
> }
>
> main() {
> auto v = new V!int();
> auto u = v[3..4];// ERROR
> }
>
> Error:
> no [] operato
On Monday, 25 January 2016 at 06:37:13 UTC, Enjoys Math wrote:
class V(T) {
public:
this() {}
V opIndex(size_t i, size_t j) {
writeln("Hello, foo!");
return this;
}
}
main() {
auto v = new V!int();
auto u = v[3..4];// ERROR
}
Error:
no [] operator overload for t
class V(T) {
public:
this() {}
V opIndex(size_t i, size_t j) {
writeln("Hello, foo!");
return this;
}
}
main() {
auto v = new V!int();
auto u = v[3..4];// ERROR
}
Error:
no [] operator overload for type the_module.V!int
On Saturday, 23 January 2016 at 07:57:55 UTC, Ali Çehreli wrote:
auto collapse(R)(R r)
if (isArray!R) {
return r.joiner.collapse.joiner;
}
auto collapse(R)(R r)
if (!isArray!R) {
return r;
}
Ali, that code only passed the one test it had for collapsing a
three level
On Sunday, 24 January 2016 at 21:04:46 UTC, Adam D. Ruppe wrote:
On Sunday, 24 January 2016 at 20:56:20 UTC, Jon D wrote:
I'm trying to identify the preferred ways to lower case a
string. In std.uni there are two functions that return the
lower case form of a string: toLower() and asLowerCase()
On Sunday, 24 January 2016 at 20:56:20 UTC, Jon D wrote:
I'm trying to identify the preferred ways to lower case a
string. In std.uni there are two functions that return the
lower case form of a string: toLower() and asLowerCase(). There
is also toLowerInPlace().
toLower will allocate a new s
I'm trying to identify the preferred ways to lower case a string.
In std.uni there are two functions that return the lower case
form of a string: toLower() and asLowerCase(). There is also
toLowerInPlace().
I'm having trouble figuring out what the relationship is between
these, and when to pr
On Saturday, 23 January 2016 at 19:42:29 UTC, Johan Engelen wrote:
Hi all,
While trying to interface C++ and D, I have to new a few D
objects in C++ code. I am doing this using a D function: "XXX
createXXX(...) { return new XXX(...); }".
An easier way for trivial constructors (note parents!
On Sunday, 24 January 2016 at 15:08:33 UTC, H. S. Teoh wrote:
On Sun, Jan 24, 2016 at 12:38:22PM +, Tofu Ninja via
Digitalmars-d-learn wrote:
I tried looking for this in phobos but cant seem to find it
which is really annoying. For my uses this works:
What kind of data do you need to write
On Sun, 24 Jan 2016 06:07:13 +, Alex Vincent wrote:
> Source code:
> https://alexvincent.us/d-language/samples/intervalmap-rev1.d.txt
There is no documentation, so I have no idea what you're trying to
achieve here. So your questions about why this isn't in Phobos, whether
there are any othe
On Saturday, 23 January 2016 at 21:06:32 UTC, Adam D. Ruppe wrote:
Are you sure you correctly casted first?
Nope sorry. Thanks for the help!!
On Sun, Jan 24, 2016 at 12:38:22PM +, Tofu Ninja via Digitalmars-d-learn
wrote:
> I tried looking for this in phobos but cant seem to find it which is
> really annoying. For my uses this works:
What kind of data do you need to write to file? If it's textual data,
use File.lockingTextWriter,
On 24.01.2016 10:02, Voitech wrote:
I added base class for Rule -> BaseRule. But this class is just a shell
without implementation.
Is there any way to avoid this ?
What's the problem with BaseRule not having any implementation? When the
different Rule instantiations don't have any common oper
I tried looking for this in phobos but cant seem to find it which
is really annoying. For my uses this works:
struct fileOutRange
{
File f;
void put(ubyte[] a)
{
f.rawWrite(a);
}
}
But was just wondering if there was a real output range for files
On Sunday, 24 January 2016 at 06:07:13 UTC, Alex Vincent wrote:
(1) It's not clear how to specify certain parts of a module or
library as non-exportable. Is that possible? Is it desirable?
(It's not that important, yet, but still...)
Yes, definitely. By default symbols in a module are `publ
On Friday, 21 June 2013 at 14:08:43 UTC, Sergei Nosov wrote:
If I have a function
auto apply(alias fun, T...)(T args)
{
return fun(args);
}
And then I have
int y = 2;
apply!(x => y)(1);
How in the world does this work? Is the context address known
at compile-time?
No, but because lambdas
Thanks for the rapid explanations and code!
Such a great forum :-)
Much obliged,
Johan
On Saturday, 23 January 2016 at 13:19:34 UTC, anonymous wrote:
On 23.01.2016 12:30, Voitech wrote:
Ok so i want to hold different types in LogicRule maybe
Algebraic
implementation would do?
private alias ControllTemplate(T) =Rule!(T,ControllFlag);
private alias SymbolRule =ControllTemplate!(Sy
18 matches
Mail list logo