#include <iostream>
using namespace std;

int x;

constexpr int foo(bool b ){
	return b ? 123 : x;	
}

int bar[foo(true)]; // ok
	
//int baz[foo(false)]; // size of array 'baz' is not an integral constant-expression
bool b;
//int bbb[foo(b)]; //array bound is not an integer constant before

int main() {
	// your code goes here
	x = 42;

	cout << foo(true) <<endl;
	cout << foo(false) <<endl;
	
	
	
	return 0;
}