Remove deprecated functionality
This commit is contained in:
		@@ -16,5 +16,3 @@ module tanya.memory;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public import tanya.memory.allocator;
 | 
					public import tanya.memory.allocator;
 | 
				
			||||||
public import tanya.memory.lifetime;
 | 
					public import tanya.memory.lifetime;
 | 
				
			||||||
deprecated("Use tanya.meta.trait.stateSize instead")
 | 
					 | 
				
			||||||
public import tanya.meta.trait : stateSize;
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,15 +20,6 @@ import tanya.meta.trait;
 | 
				
			|||||||
import tanya.meta.transform;
 | 
					import tanya.meta.transform;
 | 
				
			||||||
import tanya.range;
 | 
					import tanya.range;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
deprecated("Use tanya.memory.lifetime.swap instead")
 | 
					 | 
				
			||||||
alias swap = tanya.memory.lifetime.swap;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
deprecated("Use tanya.memory.lifetime.moveEmplace instead")
 | 
					 | 
				
			||||||
alias moveEmplace = tanya.memory.lifetime.moveEmplace;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
deprecated("Use tanya.memory.lifetime.move instead")
 | 
					 | 
				
			||||||
alias move = tanya.memory.lifetime.move;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Copies the $(D_PARAM source) range into the $(D_PARAM target) range.
 | 
					 * Copies the $(D_PARAM source) range into the $(D_PARAM target) range.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,8 +17,6 @@ module tanya.conv;
 | 
				
			|||||||
import std.traits : Unsigned;
 | 
					import std.traits : Unsigned;
 | 
				
			||||||
import tanya.container.string;
 | 
					import tanya.container.string;
 | 
				
			||||||
import tanya.memory.allocator;
 | 
					import tanya.memory.allocator;
 | 
				
			||||||
deprecated("Use tanya.memory.lifetime.emplace instead")
 | 
					 | 
				
			||||||
public import tanya.memory.lifetime : emplace;
 | 
					 | 
				
			||||||
import tanya.meta.trait;
 | 
					import tanya.meta.trait;
 | 
				
			||||||
import tanya.meta.transform;
 | 
					import tanya.meta.transform;
 | 
				
			||||||
import tanya.range;
 | 
					import tanya.range;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2253,26 +2253,6 @@ private void printToString(string fmt, OR, Args...)(ref OR result,
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        formatRange(args[0], result);
 | 
					        formatRange(args[0], result);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else static if (is(Unqual!(typeof(args[0].stringify())) == String))
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        pragma(msg, ".stringify() is deprecated. Use toString() with an output"
 | 
					 | 
				
			||||||
                  ~ " range instead");
 | 
					 | 
				
			||||||
        static if (is(Arg == class) || is(Arg == interface))
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            if (args[0] is null)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                put(result, "null");
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                put(result, args[0].stringify()[]);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            put(result, args[0].stringify()[]);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    else static if (is(typeof(args[0].toString(result)) == OR))
 | 
					    else static if (is(typeof(args[0].toString(result)) == OR))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        static if (is(Arg == class) || is(Arg == interface))
 | 
					        static if (is(Arg == class) || is(Arg == interface))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,8 +94,8 @@ struct Address4
 | 
				
			|||||||
    ///
 | 
					    ///
 | 
				
			||||||
    @nogc nothrow pure @safe unittest
 | 
					    @nogc nothrow pure @safe unittest
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        assert(address4("127.0.0.1") > address4("126.0.0.0"));
 | 
					        assert(address4("127.0.0.1").get > address4("126.0.0.0").get);
 | 
				
			||||||
        assert(address4("127.0.0.1") < address4("127.0.0.2"));
 | 
					        assert(address4("127.0.0.1").get < address4("127.0.0.2").get);
 | 
				
			||||||
        assert(address4("127.0.0.1") == address4("127.0.0.1"));
 | 
					        assert(address4("127.0.0.1") == address4("127.0.0.1"));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -233,26 +233,6 @@ struct Address4
 | 
				
			|||||||
        assert(address4("192.168.0.1").get.isUnicast());
 | 
					        assert(address4("192.168.0.1").get.isUnicast());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * Produces a string containing an IPv4 address in dotted-decimal notation.
 | 
					 | 
				
			||||||
     *
 | 
					 | 
				
			||||||
     * Returns: This address in dotted-decimal notation.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    deprecated("Use Address4.toString() instead")
 | 
					 | 
				
			||||||
    String stringify() const @nogc nothrow pure @safe
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        const octets = (() @trusted => (cast(ubyte*) &this.address)[0 .. 4])();
 | 
					 | 
				
			||||||
        enum string fmt = "{}.{}.{}.{}";
 | 
					 | 
				
			||||||
        version (LittleEndian)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            return format!fmt(octets[0], octets[1], octets[2], octets[3]);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            return format!fmt(octets[3], octets[2], octets[1], octets[0]);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Writes this IPv4 address in dotted-decimal notation.
 | 
					     * Writes this IPv4 address in dotted-decimal notation.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
@@ -502,11 +482,11 @@ struct Address6
 | 
				
			|||||||
    ///
 | 
					    ///
 | 
				
			||||||
    @nogc nothrow @safe unittest
 | 
					    @nogc nothrow @safe unittest
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        assert(address6("::14") > address6("::1"));
 | 
					        assert(address6("::14").get > address6("::1").get);
 | 
				
			||||||
        assert(address6("::1") < address6("::14"));
 | 
					        assert(address6("::1").get < address6("::14").get);
 | 
				
			||||||
        assert(address6("::1") == address6("::1"));
 | 
					        assert(address6("::1") == address6("::1"));
 | 
				
			||||||
        assert(address6("fe80::1%1") < address6("fe80::1%2"));
 | 
					        assert(address6("fe80::1%1").get < address6("fe80::1%2").get);
 | 
				
			||||||
        assert(address6("fe80::1%2") > address6("fe80::1%1"));
 | 
					        assert(address6("fe80::1%2").get > address6("fe80::1%1").get);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@@ -650,20 +630,6 @@ struct Address6
 | 
				
			|||||||
        assert(address6("fd80:124e:34f3::1").get.isUniqueLocal());
 | 
					        assert(address6("fd80:124e:34f3::1").get.isUniqueLocal());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * Returns text representation of this address.
 | 
					 | 
				
			||||||
     *
 | 
					 | 
				
			||||||
     * Returns: text representation of this address.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    deprecated("Use Address6.toString() instead")
 | 
					 | 
				
			||||||
    String stringify() const @nogc nothrow pure @safe
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        String output;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        toString(backInserter(output));
 | 
					 | 
				
			||||||
        return output;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Writes text representation of this address to an output range.
 | 
					     * Writes text representation of this address to an output range.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -630,13 +630,7 @@ template isRandomAccessRange(R)
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
void put(R, E)(ref R range, auto ref E e)
 | 
					void put(R, E)(ref R range, auto ref E e)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    static if (__traits(hasMember, R, "put")
 | 
					    static if (is(typeof((R r, E e) => r(e))))
 | 
				
			||||||
            && is(typeof((R r, E e) => r.put(e))))
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        pragma(msg, "OutputRange.put()-primitive is deprecated. Define opCall() instead.");
 | 
					 | 
				
			||||||
        range.put(e);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    else static if (is(typeof((R r, E e) => r(e))))
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        range(e);
 | 
					        range(e);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -211,14 +211,6 @@ struct Option(T)
 | 
				
			|||||||
        return this.value;
 | 
					        return this.value;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// ditto
 | 
					 | 
				
			||||||
    deprecated("Call Option.get explicitly instead of relying on alias this")
 | 
					 | 
				
			||||||
    @property ref inout(T) get_() inout
 | 
					 | 
				
			||||||
    in (!isNothing, "Option is nothing")
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return this.value;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Returns the encapsulated value if available or a default value
 | 
					     * Returns the encapsulated value if available or a default value
 | 
				
			||||||
     * otherwise.
 | 
					     * otherwise.
 | 
				
			||||||
@@ -384,8 +376,6 @@ struct Option(T)
 | 
				
			|||||||
            return isNothing ? 0U : this.value.toHash();
 | 
					            return isNothing ? 0U : this.value.toHash();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    alias get_ this;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
///
 | 
					///
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user