graph-v2 icon indicating copy to clipboard operation
graph-v2 copied to clipboard

Missing `std::_Fake_copy_init` in MSVC build

Open akrzemi1 opened this issue 2 years ago • 5 comments

I am using Microsoft Visual C++ 2022, version 17.3.4, both std C++20, and the experimental newest C++.

The compilation of std::graph::views::edges_breadth_first_search fails with an error that std::_Fake_copy_init is not defined. Removing this #ifndef guard fixes the problem. I can see that other STL implementations (like this one) do have it defined.

Maybe to enable thecompilation on any MSVC build this library should define its own type std::graph::fake_copy_init independent of the compiler used.

akrzemi1 avatar Jan 20 '24 22:01 akrzemi1

Thanks for your comment. I'll consider your recommendation. I'm not sure why you're running into a problem because I've been using the latest MSVC all along. I know it's been a while since you reported this. Do you know if you're still running into the issue?

pratzl avatar Sep 13 '24 01:09 pratzl

I confirm that the bug still persists in branch master as of today: 3d572ef49de7526d0152b63dba466f1ca51f5d4b

I am using the same version of MSVC as in the initial report.

The error message is for this like: https://github.com/stdgraph/graph-v2/blob/master/include/graph/detail/graph_cpo.hpp#L13

My single-file test project includes two graph headers in this order:

#include <iostream>
#include <string>
#include <vector>
#include <graph/views/breadth_first_search.hpp>
#include <graph/graph.hpp>

akrzemi1 avatar Sep 13 '24 05:09 akrzemi1

I'll work on getting a fix in, hopefully before I go on break next week.

Sent from Outlookhttp://aka.ms/weboutlook From: Andrzej Krzemieński @.> Sent: Friday, September 13, 2024 1:31 AM To: stdgraph/graph-v2 @.> Cc: Phil Ratzloff @.>; Comment @.> Subject: Re: [stdgraph/graph-v2] Missing std::_Fake_copy_init in MSVC build (Issue #89)

I confirm that the bug still persists in branch master as of today: 3d572efhttps://github.com/stdgraph/graph-v2/commit/3d572ef49de7526d0152b63dba466f1ca51f5d4b

I am using the same version of MSVC as in the initial report.

The error message is for this like: https://github.com/stdgraph/graph-v2/blob/master/include/graph/detail/graph_cpo.hpp#L13

My single-file test project includes two graph headers in this order:

#include

#include

#include

#include <graph/views/breadth_first_search.hpp>

#include <graph/graph.hpp>

Reply to this email directly, view it on GitHubhttps://github.com/stdgraph/graph-v2/issues/89#issuecomment-2348063960, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB7NKERVG7OZV7R6SXTY6PLZWJ2ADAVCNFSM6AAAAABOEMQJU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBYGA3DGOJWGA. You are receiving this because you commented.Message ID: @.@.>>

pratzl avatar Sep 14 '24 17:09 pratzl

I'll create an independent set of definitions outside of MSVC & gcc, as you suggest. I'll try to get it in later this week.

pratzl avatar Sep 14 '24 17:09 pratzl

I've pushed a fix. I'd appreciate it if you could let me know whether it works for you or not.

pratzl avatar Sep 20 '24 15:09 pratzl