title: Construct object by calling constructor (method) explicitly
body: <p><strong>Definition of class:</strong></p>
  
  <pre><code>#pragma once
  #include &lt;string&gt;
  #include &lt;utility&gt;
  
  namespace impress_errors {
  
  #define BUFSIZE 512
  
  class Error {
  public:
      Error(int number);
      Error(std::string message);
      Error(const char *message);
      bool IsSystemError();
      std::string GetErrorDescription();
  
  private:
      std::pair &lt;int, std::string&gt; error;
      char stringerror[BUFSIZE]; // Buffer for string describing error
      bool syserror;
  };
  
  }  // namespace impres_errors
  </code></pre>
  
  <p>I have some piece of code in file posix_lib.cpp:</p>
  
  <pre><code>int pos_close(int fd)
  {
      int ret;
      if ((ret = close(fd)) &lt; 0) {
          char err_msg[4096];
          int err_code = errno;
          throw impress_errors::Error::Error(err_code); //Call constructor explicitly
      }
      return ret;
  }
  </code></pre>
  
  <p>And in another file fs_creation.cpp:</p>
  
  <pre><code>int FSCreation::GenerateFS() {
  int result;
  try {
      result = ImprDoMakeTree(); //This call pos_close inside.
  }
  catch (impress_errors::Error error) {
      logger.LogERROR(error.GetErrorDescription());
      return ID_FSCREATE_MAKE_TREE_ERROR;
  }
  catch (...) {
      logger.LogERROR("Unexpected error in IMPRESSIONS MODULE");
      return ID_FSCREATE_MAKE_TREE_ERROR;
  }
  if(result == EXIT_FAILURE) {
      return ID_FSCREATE_MAKE_TREE_ERROR;
  }
  return ID_SUCCESS;
  }
  </code></pre>
  
  <p><strong>On my version of compiler this one is compiled and work correct:</strong><br>
  g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 (Ubuntu Maverick - 10.04)<br>
  <strong>On another version of compiler:</strong><br>
  g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 (Ubuntu Narwhal - 11.04) it causes<br>
  error:<br>
  posix_lib.cpp: In function ‘int pos_close(int)’:<br>
  posix_lib.cpp:363:46: error: cannot call constructor ‘impress_errors::Error::Error’ directly<br>
  posix_lib.cpp:363:46: error: for a function-style cast, remove the redundant ‘::Error’<br>
  <strong>Questions:</strong><br>
  1. <em>Why this work on one version of g++, and failed on another?</em><br>
  2. <em>What happens when I explicitly call constructor for creating object? Is it correct?<br>
  And why this is working?</em></p>