Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Visual Studio 2013 error: no appropriate default constructor available #188

Merged
merged 1 commit into from
Mar 30, 2018

Conversation

aallrd
Copy link
Contributor

@aallrd aallrd commented Mar 21, 2018

Summary

Code fix to remove a no appropriate default constructor available compilation error with Visual Studio 2013.

Details

I was getting the below error:

\tests\unit\StepManagerTest.cpp(78): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]
\tests\unit\StepManagerTest.cpp(86): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]
\tests\unit\StepManagerTest.cpp(94): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]
\tests\unit\StepManagerTest.cpp(103): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]
\tests\unit\StepManagerTest.cpp(110): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]
\tests\unit\StepManagerTest.cpp(121): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]
\tests\unit\StepManagerTest.cpp(128): error C2512: 'StepManagerTest' : no appropriate default constructor available [tests\StepManagerTest.vcxproj]

Motivation and Context

This fix is required to remove the solve the above error.
It allows the project to be built with the tests enabled with Visual Studio 2013.

How Has This Been Tested?

The patched project was successfully built with all tests passing on our internal CI with Visual Studio 2013/2017 on Windows and GCC 4.9, 6.3 and 7.3 on Linux.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • It is my own work, its copyright is implicitly assigned to the project and no substantial part of it has been copied from other sources (including Stack Overflow). In rare occasions this is acceptable, like in CMake modules where the original copyright information should be kept.
  • I'm using the same code standards as the existing code (indentation, spacing, variable naming, ...).
  • I've added tests for my code.
  • I have verified whether my change requires changes to the documentation
  • My change either requires no documentation change or I've updated the documentation accordingly.
  • My branch has been rebased to master, keeping only relevant commits.

@coveralls
Copy link

coveralls commented Mar 21, 2018

Coverage Status

Coverage remained the same at 63.329% when pulling 44d80fa on aallrd:fixing-step-manager-test into 70fa12c on cucumber:master.

@aallrd
Copy link
Contributor Author

aallrd commented Mar 21, 2018

Looking at the CI failures, I don't think they have anything to do with my changes.
Can you please confirm?

@konserw
Copy link
Contributor

konserw commented Mar 21, 2018

Right - we've got PRs for fixing CI already.
I've also done exact same change on my branch konserw:devel yesterday and it works ;) Worth noting is that it caused problems also on new clang, not only VS.

@konserw konserw self-requested a review March 21, 2018 09:40
@konserw konserw added the bug label Mar 21, 2018
Copy link
Contributor

@konserw konserw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove semicolons after method definition

@konserw
Copy link
Contributor

konserw commented Mar 21, 2018

Could you please squash it to one commit? Anyway it looks good to me but we are blocked on merging because of CI

konserw added a commit to konserw/cucumber-cpp that referenced this pull request Mar 23, 2018
konserw added a commit to konserw/cucumber-cpp that referenced this pull request Mar 23, 2018
konserw added a commit to konserw/cucumber-cpp that referenced this pull request Mar 30, 2018
This is group-merge which consist actualy of following fixes:
* Remove -werror compiler flag to fix failing build with clang ([cucumber#184](cucumber#184) Kamil Strzempowicz)
* Add missing virtual destructor in base class SocketServer used by TCPSocketServer and UnixSocketServer ([cucumber#183](cucumber#183) Matthieu Longo)
* Fix breaking changes in API of boost-1.66.0 ([cucumber#180](cucumber#180)  Matthieu Longo)
* Fix conflicting "using std" declaration with "using boost::thread" ([cucumber#181](cucumber#181)  Matthieu Longo)
* Fixing Visual Studio 2013 error: no appropriate default constructor available ([cucumber#188](cucumber#188) Antoine Allard)
@konserw konserw merged commit 44d80fa into cucumber:master Mar 30, 2018
@aslakhellesoy
Copy link
Contributor

Hi @aallrd,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@muggenhor muggenhor added this to the v0.5 milestone May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants