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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:30:08+00:00 2026-05-16T14:30:08+00:00

So, I have a code, that compiled on MSVC 9 and some previous (dunno

  • 0

So, I have a code, that compiled on MSVC 9 and some previous (dunno how far back it goes…), GCC, MingW, GCC on Mac…

But one line, does not compile on MSVC:

class_< vector<unsigned int> >("LayerList")
.def(constructor<>())
.def("GetCount", &vector<unsigned int>::size)
.def("Get",  &NumberGet)
.def("Add", &vector<unsigned int>::push_back) //this line refuses to compile
.def("__tostring", &LayerListToString)

If I comment it, the application compiles fine (but breaks at runtime), if I move this block somewhere else (even in other files) this particular line keeps giving errors… changing the order inside the block does not solve it too.

It gives 9 errors, most of them about wrong number of arguments in .def (some say there are 2 arguments when it expected 1, 3, 5 and one says “too much arguments”), and some about overloading failing, the most obvious one:

Error 7 error C2914: ‘luabind::class_::def’ : cannot deduce template argument as function argument is ambiguou E:\novashellSVN\clanlibstuff\novashell\source\ListBindings.cpp 178

This made me waste the entire work day… Someone has any clue on what changed on MSVC 10 to cause this? It is not anymore even bugging me because of the work stuck, but because how puzzling and strange it is.

EDIT: I compared the “vector” file, from MSVC 10, with other MSVC and GCC, and indeed in MSVC it has 3 versions, someone know EXACTLY how I make it load a specific version?

The three versions:

void push_back(const _Ty& _Val) //the one in GCC and older MSVC, thus the one I want
void push_back(_Ty&& _Val)
void push_back(bool _Val)
  • 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-16T14:30:08+00:00Added an answer on May 16, 2026 at 2:30 pm

    If you have overloaded functions you must specify which you want to use by casting “&vector::push_back” to the correct function. You must check luabind documentation for the syntax.

    Maybe now there is several methods named “push_back” and you must specify which one to use?

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Very special situation, it turned out. My form happened to… May 16, 2026 at 3:41 pm
  • Editorial Team
    Editorial Team added an answer The page will hold references to the dynamically instantiated controls… May 16, 2026 at 3:41 pm
  • Editorial Team
    Editorial Team added an answer You need to put your message assignment line inside the… May 16, 2026 at 3:41 pm

Trending Tags

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

Top Members

Related Questions

I have some code that compiles and runs on MSVC++ but will not compile
I have some original code that manages exception safety like this: void foo() {
I have some code the requires the application to be completely loaded and compiled
I'm developing cross-platform project that would support : Four C++ compilers - GCC, MSVC,
We have a sub-project 'commonUtils' that has many generic code-snippets used across the parent
I have a large program with several large DLL's that are compiled with MFC
I am using the Java Native Interface to include some statically compiled code in
I am writing some C code which is expected to compile on multiple compilers
We have a library that deals with many aspects of error reporting. I have
I have a utility that compares a source and destination file date/time. This works

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.