0

I'm writing a project in Vulkan and it compiles and runs fine. The code is the same as it always was, but after some software updates (Steam, Visual Studio, etc.) an error has been popping up.

I mention steam as that was causing a separate runtime error. The same error as here: https://www.reddit.com/r/vulkan/comments/8ybq6f/need_some_help_debugging/e29qptx/

Anyway, the line:

const std::vector<const char*> validationLayers = { "VK_LAYER_LUNARG_standard_validation" };

and ones like that using std::vector and std::array give me the error: Ambiguous symbol 'const std::vector<const char*>'

My includes and defines are as follows:

#define GLFW_INCLUDE_VULKAN
#define GLM_FORCE_RADIANS
#define STB_IMAGE_IMPLEMENTATION

#include <glfw3.h>
#include <glm.hpp>
#include <gtc/matrix_transform.hpp>
#include <stb/stb_image.h>

#include <iostream>
#include <stdexcept>
#include <functional>
#include <vector>
#include <set>
#include <algorithm>
#include <fstream>
#include <string>
#include <array>
#include <chrono>

#ifdef NDEBUG
const bool enableValidationLayers = false;
#else
const bool enableValidationLayers = true;
#endif

So if there's a way to suppress this particular error highlighting, or if there is a genuine conflict, I'd love to know where it is / how to do it.

Like I say, it still runs fine, but it is annoying to look at my scroll bar and see a bunch of red markers that would normally indicate my program not compiling.

Jesse Hall
  • 6,441
  • 23
  • 29
user4261590
  • 149
  • 9
  • 5
    you mean intellisense is showing an error? which verison of visual studio? – Alan Birtles Sep 25 '18 at 15:16
  • @AlanBirtles Yeah, Intellisense. I'm on CE 2017, 15.8.5 I also just found out that I don't get the error when I set my language standard to C++14 – user4261590 Sep 25 '18 at 15:23
  • intellisense isn't a full compiler, there are always edge cases it fails on, report it to microsoft and filter out intellisense errors until they fix it https://stackoverflow.com/questions/14713391/is-there-a-way-to-suppress-intellisense-errors-when-using-c11-features-specifi – Alan Birtles Sep 25 '18 at 15:26
  • For me it is not clear what is the problem. I don't see `vulcan` is related to the issue. Also in case `Ambiguous symbol` at least two symbols should be point out so it is clear what is causing ambiguity. – Marek R Sep 25 '18 at 15:34
  • Oh, it seemed the issue was with ReSharper, not intellisense after all. Thanks all the same. – user4261590 Sep 25 '18 at 15:38

1 Answers1

1

This turned out to be an issue with the version of ReSharper I was using. It is also reported here: https://resharper-support.jetbrains.com/hc/en-us/community/posts/360000430159-Intellisense-issue-with-C-17-standard?flash_digest=bbcceaf4d5a9c12c634a59aba32fc2143a325734

The solution is to turn it off or upgrade to R++ 2018.2

user4261590
  • 149
  • 9