2

I have run into a problem with including into my project, in spite of the fact that I have set the language of the project to "ISO C++ Latest Draft Standard (/std:c++latest)" in "MSVS 2017". Any help will be appreciated.

It is worth mentioning that it does not happen when I use another compilers including GCC and Clang.

#include "pch.h"
#include <iostream>
#include <memory>
#include <experimental/propagate_const>     <======= the problem is here

class widget {
    class impl;
    std::experimental::propagate_const<std::unique_ptr<impl>> pImpl;
public:

};

Error C1083 Cannot open include file: 'experimental/propagate_const': No such file or directory

Milad Sikaroudi
  • 677
  • 6
  • 16
  • 2
    Microsoft hasn't implemented that **experimental** header yet. I checked my current installation of MSVC 2019 version 16.1.5 and it's also not implemented there. – Blastfurnace Jul 06 '19 at 11:43
  • https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/experimental/propagate_const --- has anybody ported this to MSVC, yet ... Many thanks in advance :) – Chef Gladiator Jul 18 '19 at 11:17
  • I just found a Visual Studio implementation in [github](https://github.com/jbcoe/propagate_const) – Vincent LE GARREC Oct 17 '19 at 07:18
  • VS 2022 17.5 **still** doesn't have this :( – ChrisMM Dec 08 '22 at 18:05

0 Answers0