Merge Boost.Config changes to release.

[SVN r71480]
This commit is contained in:
John Maddock committed 2011-04-25 12:10:48 +00:00
1 parent 98d2f9fc1d
commit dd3ebc8776
84 files changed
+445 -968

No files matched your search

+20
View File
@@ -14,6 +14,26 @@ namespace boost_no_constexpr {
constexpr int square(int x) { return x * x; } // from N2235
// from 5.19:
constexpr const int* addr(const int& ir) { return &ir; }
static const int x = 5;
constexpr const int* xp = addr(x);
struct A
{
constexpr A(int i) : val(i) { }
constexpr operator int() { return val; }
constexpr operator long() { return 43; }
private:
int val;
};
template<int> struct X { };
constexpr A a = 42;
X<a> xx; // OK: unique conversion to int
int test()
{
int i = square(5);