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

  • Home
  • SEARCH
  • 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 305477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:22:38+00:00 2026-05-12T07:22:38+00:00

I have a header file with some inline template methods. I added a class

  • 0

I have a header file with some inline template methods. I added a class declaration to it (just a couple of static methods…it’s more of a namespace than a class), and I started getting this compilation error, in a file that uses that new class.

There are several other files that include the same .h file that still compile without complaint.

Googling for the error gives me a bunch of links to mailing lists about bugs on projects that have a similar error message (the only difference seeming to be what the constructor, destructor, or type conversion is supposed to precede).

I’m about ready to start stripping everything else away until I have a bare-bones minimal sample so I can ask the question intelligently, but I figured I’d take a stab at asking it the stupid way first:

Can anyone give me a basic clue about what this error message actually means so I might be able to begin to track it down/google it?

Just for the sake of completeness, the first example of where I’m seeing this looks more or less like

namespace Utilities
{
   template <typename T> GLfloat inline NormalizeHorizontally(T x)
   {
      GLfloat scaledUp = x*2.0;
      GLfloat result = scaledUp / Global::Geometry::ExpectedResolutionX;
      return result;
   }
}
  • 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-12T07:22:38+00:00Added an answer on May 12, 2026 at 7:22 am

    It means that you put the “inline” keyword in the wrong place. It needs to go before the method’s return type, e.g.

     template <typename T> inline GLfloat  NormalizeHorizontally(T x)
    

    Simple as that.

    The reason that you got this message on one compilation unit and not others may be because it is a templated function that was not being instantiated from those other compilation units.

    Generally, if you get an “expected blah blah before foobar” error, this is a parsing error and it often indicates a simple syntax mistake such as a missing semicolon, missing brace, or misordered keywords. The problem is usually somewhere around the portion mentioned, but could actually be a while back, so sometimes you have to hunt for it.

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

Sidebar

Ask A Question

Stats

  • Questions 226k
  • Answers 226k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It could be related to lazy loading the Persons collection. May 13, 2026 at 1:13 am
  • Editorial Team
    Editorial Team added an answer A little while ago, I wrote a plugin which might… May 13, 2026 at 1:13 am
  • Editorial Team
    Editorial Team added an answer <textarea><%= Model.TextAreaContent %></textarea> Please note that since you cannot escape… May 13, 2026 at 1:13 am

Related Questions

I have some template code that I would prefer to have stored in a
I'm running into a bit of an issue when I try to return a
I am doing some work on a web site that has a secure area
I've had a major annoyance with the C++ Builder IDE for some time now.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.