Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: inline policy Message-ID: <2203@dataio.Data-IO.COM> Date: 13 Nov 89 20:03:29 GMT References: <1520008@hpmwjaa.HP.COM> <1520010@hpmwjaa.HP.COM> <28966@shemp.CS.UCLA.EDU> <1218@svx.SV.DG.COM> Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Organization: Data I/O Corporation; Redmond, WA Lines: 15 The inline keyword is a *hint* to the compiler, nothing more, nothing less. It is not a command. The similarities to the register keyword are worth noting. The compiler is free to use or ignore the register keyword. In fact, modern compilers ignore it and do their own register assignments. The original reason for the register keyword are that compilers weren't sophisticated enough to do it automatically. Currently (with the separate compilation model), compilers are not sophisticated enough to make the proper decisions about inlining versus instantiating functions. The inline keyword is therefore there to help out. I fully expect in the future that the inlining decision will be made appropriately by the compiler, and that the inline keyword can be dropped.