Initialisation of immutable data in static constructors has been
deprecated.  They now need to be initialised in shared static
constructors.

This change brings the generator for D up to date with the latest
version of the compiler, but it should continue to work with older
versions.
diff --git a/compiler/cpp/src/thrift/generate/t_d_generator.cc b/compiler/cpp/src/thrift/generate/t_d_generator.cc
index b844204..65f4b44 100644
--- a/compiler/cpp/src/thrift/generate/t_d_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_d_generator.cc
@@ -145,7 +145,7 @@
         indent(f_consts) << "immutable(" << render_type_name(type) << ") " << name << ";" << endl;
       }
 
-      f_consts << endl << "static this() {" << endl;
+      f_consts << endl << "shared static this() {" << endl;
       indent_up();
 
       bool first = true;