A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/fmtlib/fmt/issues/4129 below:

lvalue required as increment operand" · Issue #4129 · fmtlib/fmt · GitHub

Skip to content Navigation Menu

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Additional navigation options

Building fails with "error: lvalue required as increment operand" #4129

Description

Compiler is gcc 8.3.1

Can reproduce on godbolt with this code:

#include "fmt/format.h"

int main() {
  char buffer[4];
  auto result = fmt::format_to(buffer, "{}", 12345);

}

Output on godbolt:

In file included from /opt/compiler-explorer/libs/fmt/trunk/include/fmt/format.h:41,
                 from <source>:2:
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/base.h: In instantiation of 'struct fmt::v11::detail::is_output_iterator<char [4], char, void>':
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/base.h:3025:11:   required by substitution of 'template<class OutputIt, class ... T, typename std::enable_if<fmt::v11::detail::is_output_iterator<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, char>::value, int>::type <anonymous> > fmt::v11::remove_cvref_t<T> fmt::v11::format_to(OutputIt&&, fmt::v11::format_string<T ...>, T&& ...) [with OutputIt = char (&)[4]; T = {int}; typename std::enable_if<fmt::v11::detail::is_output_iterator<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, char>::value, int>::type <anonymous> = <missing>]'
<source>:6:51:   required from here
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/base.h:1583:48: error: lvalue required as increment operand
     It, T, void_t<decltype(*std::declval<It&>()++ = std::declval<T>())>>
                             ~~~~~~~~~~~~~~~~~~~^~
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/base.h:1583:48: error: lvalue required as increment operand
Compiler returned: 1

We discovered this issue when trying to build the fmt package after cloning the repo from github. After cloning, mkdir build && cd build && cmake .. && make

Output from this:

[ 16%] Building CXX object test/CMakeFiles/base-test.dir/base-test.cc.o
In file included from /home/nlsweet/external/fmt/test/base-test.cc:12:
/home/nlsweet/external/fmt/include/fmt/base.h: In instantiation of ‘struct fmt::v11::detail::is_output_iterator<char [4], char, void>’:
/home/nlsweet/external/fmt/include/fmt/base.h:2936:11:   required by substitution of ‘template<class OutputIt, class ... T, typename std::enable_if<fmt::v11::detail::is_output_iterator<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, char>::value, int>::type <anonymous> > fmt::v11::remove_cvref_t<T> fmt::v11::format_to(OutputIt&&, fmt::v11::format_string<T ...>, T&& ...) [with OutputIt = char (&)[4]; T = {int}; typename std::enable_if<fmt::v11::detail::is_output_iterator<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, char>::value, int>::type <anonymous> = <missing>]’
/home/nlsweet/external/fmt/test/base-test.cc:729:51:   required from here
/home/nlsweet/external/fmt/include/fmt/base.h:1576:48: error: lvalue required as increment operand
     It, T, void_t<decltype(*std::declval<It&>()++ = std::declval<T>())>>
                             ~~~~~~~~~~~~~~~~~~~^~
/home/nlsweet/external/fmt/include/fmt/base.h:1576:48: error: lvalue required as increment operand
make[2]: *** [test/CMakeFiles/base-test.dir/build.make:76: test/CMakeFiles/base-test.dir/base-test.cc.o] Error 1

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4