8000 Using back_inserter without the std:: prefix · Issue #4113 · fmtlib/fmt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Using back_inserter without the std:: prefix #4113
Closed
@thraneh

Description

@thraneh

I have a custom container with appropriate iterators, push_back method, etc. This used to work up until fmt 10.0.2

I haven't yet been able to set up a minimal example to reproduce this.

However, the issue arise from this line where back_inserter is used without the std:: prefix (maybe you wanted to use your own invoke_back_inserter?)

The issue was seen when compiling C++23

GCC 14.1.0 (Linux)

.../opt/conda/envs/dev/include/fmt/base.h:1089:48: error: 'back_inserter' was not declared in this scope; did you mean 'std::back_inserter'?
 1089 |   auto out() -> OutputIt { return back_inserter(container_); }
      |                                   ~~~~~~~~~~~~~^~~~~~~~~~~~
      |                                   std::back_inserter

Clang 18.1.8 (MacOS)

.../opt/conda/envs/dev/include/fmt/base.h:1089:35: error: use of undeclared identifier 'back_inserter'
 1089 |   auto out() -> OutputIt { return back_inserter(container_); }
      |

I can work around this by defining back_inserter in the global namespace before including any of the fmt headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0