// // Copyright (c) 2012-2020 Kris Jusiak (kris at jusiak dot net) // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // //<- #include //-> #include namespace di = boost::di; /*<>*/ struct example1 { /*<>*/ example1(double, int) { assert(false); } /*<>*/ example1(int i, double d, ...) { assert(i == 42); assert(d == 87.0); } }; struct example2 { /*<>*/ explicit example2(int i, ...) { assert(i == 42); } /*<>*/ example2(int, double, float) { assert(false); } }; int main() { /*<>*/ // clang-format off auto injector = di::make_injector( di::bind().to(42) , di::bind().to(87.0) ); // clang-format on /*<>*/ injector.create(); /*<>*/ injector.create(); }