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 6670041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:13:19+00:00 2026-05-26T03:13:19+00:00

typedef char TCHAR; template <class T> class MyTemplateString { }; template <class T> class

  • 0
typedef char TCHAR;

template <class T> class MyTemplateString
{

};
template <class T> class MyList
{

};
typedef MyTemplateString<TCHAR>         MyString;

MyList<MyString> outlist;// here it's showing compile time error

The error is:

Implicit instantiation of undefined template MyList <MyTemplateString<char>>

Works fine with GCC compiler only but does not work in LLVM-GCC compiler.

  • 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-05-26T03:13:19+00:00Added an answer on May 26, 2026 at 3:13 am

    The code as posted above compiles fine here without any errors or warnings using both g++ and llvm-g++:

    $ g++ -Wall -c template.cpp 
    
    $ llvm-g++ -Wall -c template.cpp 
    

    Version info:

    $ g++ -v
    Using built-in specs.
    Target: i686-apple-darwin10
    Configured with: /var/tmp/gcc/gcc-5666.3~123/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
    Thread model: posix
    gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
    
    $ llvm-g++ -v
    Using built-in specs.
    Target: i686-apple-darwin10
    Configured with: /var/tmp/llvmgcc42/llvmgcc42-2335.9~9/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --enable-llvm=/var/tmp/llvmgcc42/llvmgcc42-2335.9~9/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1
    Thread model: posix
    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.9)
    

    My guess is that your real problem lies elsewhere.

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

Sidebar

Related Questions

template<class T, class U> struct is_convertible { typedef char yes; typedef struct {char _[2];}no;
template<class T> struct IsFunc { typedef char one; typedef struct { char dummy_[2]; }
where is the mistake? My code here: typedef struct _box { char *dados; struct
How does the following code work? typedef char (&yes)[1]; typedef char (&no)[2]; template <typename
I am having hard time understanding typedef pattern for arrays. typedef char Char10[10]; void
#include <iostream> template<typename T, int = 0> struct test { typedef char type[3]; };
I have the following struct in C++: #define MAXCHARS 15 typedef struct { char
Do you prefer to see something like t_byte* (with typedef unsigned char t_byte )
I have the following construction: typedef struct bucket { char *key; ENTRY *data; struct
I have a struct like this typedef struct bookStruct { char title[80]; char author[80];

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.