Fixed compilation for dmd 2.067
This commit is contained in:
parent
0a0e966a26
commit
bfd8654816
|
@ -55,13 +55,13 @@ final class Composer
|
||||||
///We need one appender for each nesting level that involves
|
///We need one appender for each nesting level that involves
|
||||||
///a pair array, as the inner levels are processed as a
|
///a pair array, as the inner levels are processed as a
|
||||||
///part of the outer levels. Used as a stack.
|
///part of the outer levels. Used as a stack.
|
||||||
Appender!(Node.Pair[], Node.Pair)[] pairAppenders_;
|
Appender!(Node.Pair[])[] pairAppenders_;
|
||||||
///Used to reduce allocations when creating node arrays.
|
///Used to reduce allocations when creating node arrays.
|
||||||
///
|
///
|
||||||
///We need one appender for each nesting level that involves
|
///We need one appender for each nesting level that involves
|
||||||
///a node array, as the inner levels are processed as a
|
///a node array, as the inner levels are processed as a
|
||||||
///part of the outer levels. Used as a stack.
|
///part of the outer levels. Used as a stack.
|
||||||
Appender!(Node[], Node)[] nodeAppenders_;
|
Appender!(Node[])[] nodeAppenders_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -347,7 +347,7 @@ final class Constructor
|
||||||
* ctor = Constructor function.
|
* ctor = Constructor function.
|
||||||
*/
|
*/
|
||||||
auto addConstructor(T)(const Tag tag, T function(ref Node) ctor)
|
auto addConstructor(T)(const Tag tag, T function(ref Node) ctor)
|
||||||
@safe pure nothrow
|
@safe nothrow
|
||||||
{
|
{
|
||||||
assert((tag in fromScalar_) is null &&
|
assert((tag in fromScalar_) is null &&
|
||||||
(tag in fromSequence_) is null &&
|
(tag in fromSequence_) is null &&
|
||||||
|
@ -859,7 +859,7 @@ struct MyStruct
|
||||||
{
|
{
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
|
|
||||||
const int opCmp(ref const MyStruct s) const pure @safe nothrow
|
int opCmp(ref const MyStruct s) const pure @safe nothrow
|
||||||
{
|
{
|
||||||
if(x != s.x){return x - s.x;}
|
if(x != s.x){return x - s.x;}
|
||||||
if(y != s.y){return y - s.y;}
|
if(y != s.y){return y - s.y;}
|
||||||
|
|
|
@ -70,7 +70,7 @@ string searchCode(dstring chars, uint tableSize)() @safe pure //nothrow
|
||||||
{
|
{
|
||||||
code ~=
|
code ~=
|
||||||
q{
|
q{
|
||||||
static immutable ubyte table_[%s] = [
|
static immutable ubyte[%s] table_ = [
|
||||||
%s];
|
%s];
|
||||||
}.format(tableSize, table[].map!(c => c ? q{true} : q{false}).join(q{, }));
|
}.format(tableSize, table[].map!(c => c ? q{true} : q{false}).join(q{, }));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1804,7 +1804,7 @@ package:
|
||||||
//
|
//
|
||||||
// Params: pairs = Appender managing the array of pairs to merge into.
|
// Params: pairs = Appender managing the array of pairs to merge into.
|
||||||
// toMerge = Pair to merge.
|
// toMerge = Pair to merge.
|
||||||
void merge(ref Appender!(Node.Pair[], Node.Pair) pairs, ref Node.Pair toMerge) @trusted
|
void merge(ref Appender!(Node.Pair[]) pairs, ref Node.Pair toMerge) @trusted
|
||||||
{
|
{
|
||||||
foreach(ref pair; pairs.data)
|
foreach(ref pair; pairs.data)
|
||||||
{
|
{
|
||||||
|
@ -1820,7 +1820,7 @@ void merge(ref Appender!(Node.Pair[], Node.Pair) pairs, ref Node.Pair toMerge) @
|
||||||
//
|
//
|
||||||
// Params: pairs = Appender managing the array of pairs to merge into.
|
// Params: pairs = Appender managing the array of pairs to merge into.
|
||||||
// toMerge = Pairs to merge.
|
// toMerge = Pairs to merge.
|
||||||
void merge(ref Appender!(Node.Pair[], Node.Pair) pairs, Node.Pair[] toMerge) @trusted
|
void merge(ref Appender!(Node.Pair[]) pairs, Node.Pair[] toMerge) @trusted
|
||||||
{
|
{
|
||||||
bool eq(ref Node.Pair a, ref Node.Pair b){return a.key == b.key;}
|
bool eq(ref Node.Pair a, ref Node.Pair b){return a.key == b.key;}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ module dyaml.nogcutil;
|
||||||
|
|
||||||
import std.traits;
|
import std.traits;
|
||||||
import std.typecons;
|
import std.typecons;
|
||||||
|
import std.typetuple;
|
||||||
import std.range;
|
import std.range;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -602,7 +602,7 @@ struct MyStruct
|
||||||
{
|
{
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
|
|
||||||
const int opCmp(ref const MyStruct s) const pure @safe nothrow
|
int opCmp(ref const MyStruct s) const pure @safe nothrow
|
||||||
{
|
{
|
||||||
if(x != s.x){return x - s.x;}
|
if(x != s.x){return x - s.x;}
|
||||||
if(y != s.y){return y - s.y;}
|
if(y != s.y){return y - s.y;}
|
||||||
|
|
Loading…
Reference in a new issue