diff --git a/flang/include/flang/Evaluate/constant.h b/flang/include/flang/Evaluate/constant.h index 6fc22e3b86aa2..d4c6601c37bca 100644 --- a/flang/include/flang/Evaluate/constant.h +++ b/flang/include/flang/Evaluate/constant.h @@ -110,8 +110,12 @@ class ConstantBase : public ConstantBounds { using Result = RESULT; using Element = ELEMENT; - template + // Constructor for creating ConstantBase from an actual value (i.e. + // literals, etc.) + template >> ConstantBase(const A &x, Result res = Result{}) : result_{res}, values_{x} {} + ConstantBase(ELEMENT &&x, Result res = Result{}) : result_{res}, values_{std::move(x)} {} ConstantBase(