diff --git a/include/gsl/multi_span b/include/gsl/multi_span index f1a909e..0c1506e 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -518,31 +518,31 @@ namespace details struct TypeListIndexer { const TypeChain& obj_; - TypeListIndexer(const TypeChain& obj) : obj_(obj) {} + constexpr TypeListIndexer(const TypeChain& obj) : obj_(obj) {} template - const TypeChain& getObj(std::true_type) + constexpr const TypeChain& getObj(std::true_type) { return obj_; } template - auto getObj(std::false_type) + constexpr auto getObj(std::false_type) -> decltype(TypeListIndexer(static_cast(obj_)).template get()) { return TypeListIndexer(static_cast(obj_)).template get(); } template - auto get() -> decltype(getObj(std::integral_constant())) + constexpr auto get() -> decltype(getObj(std::integral_constant())) { return getObj(std::integral_constant()); } }; template - TypeListIndexer createTypeListIndexer(const TypeChain& obj) + constexpr TypeListIndexer createTypeListIndexer(const TypeChain& obj) { return TypeListIndexer(obj); }