+ Reply to Thread
Results 1 to 2 of 2

Thread: Can a constructor be inline?

  1. #1

    Can a constructor be inline?

    Can a constructor be inline?

    Is it safe?

    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Feb 2012
    Posts
    109
    Yes, constructor can be inline.

    but be careful where you have class hierarchy and more code code is part of constructor of each class.

    Example:

    Code:
    class CInline
    {
    public:
    	inline CInline()
    	{
    	}
    } ;
    
    void UseInline()
    {
           CInline objInline ;
    }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts