Fixed compilation for dmd 2.067

This commit is contained in:
Soar Qin 2015-03-17 14:08:31 +08:00
parent 0a0e966a26
commit bfd8654816
6 changed files with 9 additions and 8 deletions

View file

@ -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:
/** /**

View file

@ -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;}

View file

@ -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{, }));
} }

View file

@ -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;}

View file

@ -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;

View file

@ -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;}