Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9137909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:11:17+00:00 2026-06-17T09:11:17+00:00

Delegated Construction Question: Compiler Error C2039: ‘{ctor}’ is not a member of Logging::LogManager I

  • 0

Delegated Construction Question:
Compiler Error C2039: ‘{ctor}’ is not a member of Logging::LogManager

I am using Microsoft’s C++ November 2012 CTP Compiler, not the default one in Visual Studio 2012, so I have access to new C++ features, (variadic templates, etc).

I am trying to get delegated construction to work using namespaces and header files… I am not certain if this falls under the base constructor inheritance features yet to be implemented in Visual Studio 2012; so, it may be the case that I shouldn’t expect this to work:

How do you do this in C++ 11?

// LogManager.h extract

namespace Logging {
    class LogManager
    { 
private:
            static std::wstring defaultFileName;
            explicit LogManager(std::wstring logFileName);
            explicit LogManager();
          ~LogManager(void);
}

// LogManager.cpp extract
/********************************************************************
*****/
Logging::LogManager::LogManager(std::wstring fileName)
{}

/********************************************************************
*****/
Logging::LogManager::LogManager()
    : LogManager(defaultFileName) // Yields C2664     
 // : Logging::LogManager::LogManager(defaultFileName) // Yields C2039
 // : Logging::LogManager(defaultFileName) // Yields C2614 

{} 

error C2039: ‘{ctor}’ : is not a member of ‘Logging::LogManager’

error C2614: ‘Logging::LogManager’ : illegal member initialization: ‘LogManager’ is not a base or member

error C2664: ‘Logging::LogManager::LogManager(const Logging::LogManager &)’ : cannot
convert parameter 2 from ‘std::wstring’ to ‘const Logging::LogManager &’

Answer::
Cannot use explicit keyword in header file per known bug already known to Microsoft.

Only the first signature will work of the Constructor will work with this .. workaround.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:11:17+00:00Added an answer on June 17, 2026 at 9:11 am

    This appears to be a bug in the CTP. It also shows up during this presentation by Stephan T. Lavavej (see from min 38:45).

    The only possible workaround is to drop the explicit qualifier, if that’s acceptable in your project. Otherwise, just avoid delegating to an explicit constructor.

    In particular, this is not related to inherited constructors, which is a different feature and is not supported by the CTP (as Stephan T. Lavavej says in the same presentation I linked – just a few minutes after the bug occurs).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The jQuery docs at http://api.jquery.com/on/ mention the benefits of delegated-events using the following syntax
I have a website that logs in using an STS, then gets a delegated
jQuery delegate function is giving 'not a function' error for my plugin. So I
Maybe a stupid question, but.. In my code I use the following construction at
I'm following on from a previous question . The answer I accepted involves using
Backstory: I'm using log4net to handle all logging for a project I'm working on.
How can I call HttpServletReponse from JBPM execution context. This is because delegated java
I struggled to write a more appropriate 'title' to this question - I will
can any one tell me how Local.name(.) xquery function works. regarding sql construction problem
In a recent question on stubbing, many answers suggested C# interfaces or delegates for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.