@@ -104,21 +104,21 @@ class Generator {
104104 ShaderStageArrayInfo shader_stage_array_info (const GenInput& gen, const refl::ProgramReflection& prog, ShaderStage::Enum stage, Slang::Enum slang);
105105
106106 // line output
107- template <typename ... T> void l (fmt::format_string<T...> fmt, T&&... args) {
108- const std::string str = fmt::format (" {}{}" , indentation, fmt::format (fmt::runtime (fmt), args...));
107+ template <typename ... T> void l (fmt::string_view fmt, T&&... args) {
108+ const std::string str = fmt::format (" {}{}" , indentation, fmt::format (fmt::runtime (fmt), std::forward<T>( args) ...));
109109 content.append (str);
110110 }
111- template <typename ... T> void l_append (fmt::format_string<T...> fmt, T&&... args) {
112- const std::string str = fmt::format (fmt, args...);
111+ template <typename ... T> void l_append (fmt::string_view fmt, T&&... args) {
112+ const std::string str = fmt::format (fmt::runtime (fmt), std::forward<T>( args) ...);
113113 content.append (str);
114114 }
115- template <typename ... T> void l_open (fmt::format_string<T...> fmt, T&&... args) {
116- l (fmt::runtime (fmt), args...);
115+ template <typename ... T> void l_open (fmt::string_view fmt, T&&... args) {
116+ l (fmt, std::forward<T>( args) ...);
117117 indent ();
118118 }
119- template <typename ... T> void l_close (fmt::format_string<T...> fmt, T&&... args) {
119+ template <typename ... T> void l_close (fmt::string_view fmt, T&&... args) {
120120 dedent ();
121- l (fmt::runtime (fmt), args...);
121+ l (fmt, std::forward<T>( args) ...);
122122 }
123123 template <typename ... T> void l_close () {
124124 dedent ();
@@ -127,16 +127,16 @@ class Generator {
127127 void cbl_start () {
128128 l_open (" {}\n " , comment_block_start ());
129129 }
130- template <typename ... T> void cbl (fmt::format_string<T...> fmt, T&&... args) {
130+ template <typename ... T> void cbl (fmt::string_view fmt, T&&... args) {
131131 std::string str = pystring::rstrip (fmt::format (" {}{}{}" , comment_block_line_prefix (), indentation, fmt::format (fmt::runtime (fmt), args...)));
132132 str += " \n " ;
133133 content.append (str);
134134 }
135- template <typename ... T> void cbl_open (fmt::format_string<T...> fmt, T&&... args) {
135+ template <typename ... T> void cbl_open (fmt::string_view fmt, T&&... args) {
136136 cbl (fmt, args...);
137137 indent ();
138138 }
139- template <typename ... T> void cbl_close (fmt::format_string<T...> fmt, T&&... args) {
139+ template <typename ... T> void cbl_close (fmt::string_view fmt, T&&... args) {
140140 dedent ();
141141 cbl (fmt, args...);
142142 }
0 commit comments