1 // Copyright (C) 2011 John Maddock
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org/libs/config for most recent version.
8 // MACRO: BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
9 // TITLE: C++0x unified initialization syntax unavailable
10 // DESCRIPTION: The compiler does not support C++0x unified initialization syntax: see http://en.wikipedia.org/wiki/C%2B%2B0x#Uniform_initialization
14 namespace boost_no_cxx11_unified_initialization_syntax {
25 AltStruct(int x, double y) : x_{x}, y_{y} {}
26 int X() const { return x_; }
27 double Y() const { return y_; }
37 bool operator == (const IdString& other)
39 return identifier == other.identifier && name == other.name;
45 return {"SomeName", 4}; //Note the lack of explicit type.
50 BasicStruct var1{5, 3.2};
51 AltStruct var2{2, 4.3};
55 IdString id{"SomeName", 4};
56 return id == get_string() ? 0 : 1;