blob: 6bdf76c92e995df02cf1c091f928a3302fd2f1e3 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11
// <propagate_const>
// propagate_const::operator element_type*();
#include <experimental/propagate_const>
#include "propagate_const_helpers.h"
#include <cassert>
using std::experimental::propagate_const;
int main() {
typedef propagate_const<XWithImplicitIntStarConversion> P;
P p(1);
int* ptr_1 = p;
assert(*ptr_1==1);
*ptr_1 = 2;
assert(*ptr_1==2);
}