mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Add forwards compatibility for older Phobos distributions
This commit is contained in:
parent
86fb525066
commit
2bbbbac416
31
source/poodinis/polyfill.d
Normal file
31
source/poodinis/polyfill.d
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/**
|
||||||
|
* Forward-compatibility module for providing support for Phobos functionality
|
||||||
|
* not available in older versions of Phobos.
|
||||||
|
*
|
||||||
|
* Should not implement functionalitiy which is gone from the latest Phobos.
|
||||||
|
*
|
||||||
|
* The baseline compatibility is D/Phobos 2.068.0
|
||||||
|
*
|
||||||
|
* Authors: $(HTTP erdani.org, Andrei Alexandrescu) Jonathan M Davis and Mike Bierlee (m.bierlee@lostmoment.com)
|
||||||
|
* Copyright: Copyright Andrei Alexandrescu 2008-, Jonathan M Davis 2011-., 2014- Mike Bierlee
|
||||||
|
* License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0)
|
||||||
|
*/
|
||||||
|
|
||||||
|
module poodinis.polyfill;
|
||||||
|
|
||||||
|
import std.exception;
|
||||||
|
|
||||||
|
static if (!__traits(compiles, basicExceptionCtors)) {
|
||||||
|
mixin template basicExceptionCtors()
|
||||||
|
{
|
||||||
|
this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) @nogc @safe pure nothrow
|
||||||
|
{
|
||||||
|
super(msg, file, line, next);
|
||||||
|
}
|
||||||
|
|
||||||
|
this(string msg, Throwable next, string file = __FILE__, size_t line = __LINE__) @nogc @safe pure nothrow
|
||||||
|
{
|
||||||
|
super(msg, file, line, next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ module poodinis.valueinjection;
|
||||||
|
|
||||||
import std.exception;
|
import std.exception;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
import poodinis.polyfill;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown when something goes wrong during value injection.
|
* Thrown when something goes wrong during value injection.
|
||||||
|
|
Loading…
Reference in a new issue