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


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

how to inline member function is a separate file

From Stanley Rice <heconghui@gmail.com>
Newsgroups comp.lang.c++
Subject how to inline member function is a separate file
Date 2012-02-19 21:09 -0800
Organization http://groups.google.com
Message-ID <17823047.699.1329714548355.JavaMail.geo-discussion-forums@pbgq3> (permalink)

Show all headers | View raw


If a member function is defined within the class body, the member function 
is default inlined. However, if I want to define the function is a separate 
file with other un-inlined function, Lippman said in C++ Primer that it is 
ok. Just prefix the inline keyword in preceed the function definition. 
However, It doesn't work for my compiler, gcc 4.4.3, and my compile option 
is -Wall -Wextra -g -std=c++98

Thanks

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


Thread

how to inline member function is a separate file Stanley Rice <heconghui@gmail.com> - 2012-02-19 21:09 -0800
  Re: how to inline member function is a separate file Ian Collins <ian-news@hotmail.com> - 2012-02-20 18:31 +1300
  Re: how to inline member function is a separate file Jun Fang <heyfng@gmail.com> - 2012-02-20 02:16 -0800
  Re: how to inline member function is a separate file Juha Nieminen <nospam@thanks.invalid> - 2012-02-20 10:26 +0000
  Re: how to inline member function is a separate file "Bo Persson" <bop@gmb.dk> - 2012-02-22 20:16 +0100
    Re: how to inline member function is a separate file Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-02-22 20:29 +0000
      Re: how to inline member function is a separate file Robert Wessel <robertwessel2@yahoo.com> - 2012-02-22 21:42 -0600

csiph-web