Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #122610

Re: Inlining of auto generated move constructor/assignment failed

From Andrey Tarasevich <noone@noone.net>
Newsgroups comp.lang.c++
Subject Re: Inlining of auto generated move constructor/assignment failed
Date 2025-08-20 22:58 -0700
Organization A noiseless patient Spider
Message-ID <1086cha$oqbt$1@dont-email.me> (permalink)
References <1082n2t$1av0e$1@gwaiyur.mb-net.net>

Show all headers | View raw


On Tue 8/19/2025 1:33 PM, Marcel Mueller wrote:
> 
> OK, there are 3 members of non-POD type, any maybe inlining is not 
> adequate. But shouldn't the compiler just take the best implementation?
> Or are default generated functions necessarily forced to be inline?

It might be a simple consequence of a lazy implementation.

The standard says that an implicitly declared copy/move assignment 
operator is an _inline_ public member of its class. So, it is quite 
possible that GCC just marks such functions internally as "inline". And 
later it issues a diagnostic when it fails to actually substitute some 
call, just like it would for any other inline function.

Obviously, this diagnostic would be more appropriate for situations when 
inlining was explicitly requested (or hinted at) by the user. But it is 
quite possible that at that point GCC simply can't tell inlining 
requested by the user from inlining of implicitly declared special 
member functions.

-- 
Best regards,
Andrey

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Inlining of auto generated move constructor/assignment failed Marcel Mueller <news.5.maazl@spamgourmet.org> - 2025-08-19 22:33 +0200
  Re: Inlining of auto generated move constructor/assignment failed Andrey Tarasevich <noone@noone.net> - 2025-08-20 22:58 -0700
    Re: Inlining of auto generated move constructor/assignment failed [solved] Marcel Mueller <news.5.maazl@spamgourmet.org> - 2025-08-23 10:41 +0200
      Re: Inlining of auto generated move constructor/assignment failed boltar@caprica.universe - 2025-08-23 09:14 +0000
        Re: Inlining of auto generated move constructor/assignment failed David Brown <david.brown@hesbynett.no> - 2025-08-23 16:15 +0200
          Re: Inlining of auto generated move constructor/assignment failed boltar@caprica.universe - 2025-08-23 14:26 +0000
            Re: Inlining of auto generated move constructor/assignment failed David Brown <david.brown@hesbynett.no> - 2025-08-24 14:45 +0200
              Re: Inlining of auto generated move constructor/assignment failed "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-24 12:56 -0700
                Re: Inlining of auto generated move constructor/assignment failed "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-24 13:10 -0700
                Re: Inlining of auto generated move constructor/assignment failed David Brown <david.brown@hesbynett.no> - 2025-08-25 08:19 +0200
                Re: Inlining of auto generated move constructor/assignment failed "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-27 16:34 -0700
              Re: Inlining of auto generated move constructor/assignment failed boltar@caprica.universe - 2025-08-24 20:42 +0000
                Re: Inlining of auto generated move constructor/assignment failed Ike Naar <ike@sdf.org> - 2025-08-25 06:52 +0000
                Re: Inlining of auto generated move constructor/assignment failed scott@slp53.sl.home (Scott Lurndal) - 2025-08-25 14:27 +0000
                Re: Inlining of auto generated move constructor/assignment failed David Brown <david.brown@hesbynett.no> - 2025-08-25 16:36 +0200
                Re: Inlining of auto generated move constructor/assignment failed boltar@battlestar-galactica.com - 2025-08-25 20:01 +0000
                Re: Inlining of auto generated move constructor/assignment failed David Brown <david.brown@hesbynett.no> - 2025-08-26 09:06 +0200
                Re: Inlining of auto generated move constructor/assignment failed boltar@battlestar-galactica.com - 2025-08-26 18:30 +0000
                Re: Inlining of auto generated move constructor/assignment failed David Brown <david.brown@hesbynett.no> - 2025-08-26 22:49 +0200
                Re: Inlining of auto generated move constructor/assignment failed boltar@battlestar-galactica.com - 2025-08-27 15:39 +0000

csiph-web