خرید بک لینک

Vote count: 0

I'm using the Catch unit test library. In one of my test cases, I need to be able to verify that a specific constructor in my class remains explicit (In other words, if the explicit keyword is removed the test should fail to compile with a helpful/contextual message).

Is this something I can do with static_assert? If so, what would be the correct procedure? I have thought about using static_assert with something like type traits, but I don't see a way to verify explicit constructors via type traits.

FYI, I have C++14 enabled on GCC 4.9 (NDK & Ubuntu) and on VS 2015 (Windows), just in case "partial-support" is an issue on any of these toolchains/platforms.

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 21 ارديبهشت 1395 ساعت: 5:11

صفحه بندی